The following changes since commit cef9175e52e8a240117b9f45b228fdaa0f1c0572: Ensure that stat outputs are serialized (2013-04-26 17:05:57 -0600) are available in the git repository at: git://git.kernel.dk/fio.git master Bruce Cran (1): Add support for dumping the status on Windows. Jens Axboe (2): Move __NR_shm* syscall numbers to x86-64 where they belong Add distclean target Makefile | 5 ++++- arch/arch-x86.h | 6 ------ arch/arch-x86_64.h | 7 +++++++ stat.c | 14 ++++++++++++-- 4 files changed, 23 insertions(+), 9 deletions(-) --- Diff of recent changes: diff --git a/Makefile b/Makefile index d10123e..781cdec 100644 --- a/Makefile +++ b/Makefile @@ -262,7 +262,10 @@ t/lfsr-test: $(T_LFSR_TEST_OBJS) $(QUIET_LINK)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(T_LFSR_TEST_OBJS) $(LIBS) $(LDFLAGS) clean: FORCE - -rm -f .depend $(FIO_OBJS) $(GFIO_OBJS) $(OBJS) $(T_OBJS) $(PROGS) $(T_PROGS) core.* core gfio FIO-VERSION-FILE config-host.mak config-host.h cscope.out *.d + -rm -f .depend $(FIO_OBJS) $(GFIO_OBJS) $(OBJS) $(T_OBJS) $(PROGS) $(T_PROGS) core.* core gfio FIO-VERSION-FILE *.d config-host.mak config-host.h + +distclean: clean FORCE + @rm -f cscope.out cscope: @cscope -b -R diff --git a/arch/arch-x86.h b/arch/arch-x86.h index 49e64dd..385a912 100644 --- a/arch/arch-x86.h +++ b/arch/arch-x86.h @@ -29,12 +29,6 @@ static inline void do_cpuid(unsigned int *eax, unsigned int *ebx, #define __NR_sys_vmsplice 316 #endif -#ifndef __NR_shmget -#define __NR_shmget 29 -#define __NR_shmat 30 -#define __NR_shmctl 31 -#endif - #define FIO_HUGE_PAGE 4194304 #define nop __asm__ __volatile__("rep;nop": : :"memory") diff --git a/arch/arch-x86_64.h b/arch/arch-x86_64.h index 8bdf01e..d7ea12e 100644 --- a/arch/arch-x86_64.h +++ b/arch/arch-x86_64.h @@ -29,6 +29,13 @@ static inline void do_cpuid(unsigned int *eax, unsigned int *ebx, #define __NR_sys_vmsplice 278 #endif +#ifndef __NR_shmget +#define __NR_shmget 29 +#define __NR_shmat 30 +#define __NR_shmctl 31 +#define __NR_shmdt 67 +#endif + #define FIO_HUGE_PAGE 2097152 #define nop __asm__ __volatile__("rep;nop": : :"memory") diff --git a/stat.c b/stat.c index b386188..332ccd0 100644 --- a/stat.c +++ b/stat.c @@ -1445,11 +1445,21 @@ static struct timeval status_time; static int check_status_file(void) { struct stat sb; + const char *temp_dir; + char fio_status_file_path[PATH_MAX]; - if (stat(FIO_STATUS_FILE, &sb)) + temp_dir = getenv("TMPDIR"); + if (temp_dir == NULL) + temp_dir = getenv("TEMP"); + if (temp_dir == NULL) + temp_dir = "/tmp"; + + snprintf(fio_status_file_path, sizeof(fio_status_file_path), "%s/%s", temp_dir, FIO_STATUS_FILE); + + if (stat(fio_status_file_path, &sb)) return 0; - unlink(FIO_STATUS_FILE); + unlink(fio_status_file_path); return 1; } -- To unsubscribe from this list: send the line "unsubscribe fio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html