mirror of
https://github.com/AltraMayor/f3.git
synced 2025-09-15 10:07:26 -04:00
Merge pull request #61 from sgerwk/master
Fix starting time in f3read, and adding DESTDIR variable to Makefile
This commit is contained in:
commit
abd7ae0785
14
Makefile
14
Makefile
@ -12,15 +12,15 @@ all: $(TARGETS)
|
||||
extra: $(EXTRA_TARGETS)
|
||||
|
||||
install: all
|
||||
$(INSTALL) -d $(PREFIX)/bin
|
||||
$(INSTALL) -oroot -groot -m755 $(TARGETS) $(PREFIX)/bin
|
||||
$(INSTALL) -d $(PREFIX)/share/man/man1
|
||||
$(INSTALL) -oroot -groot -m644 f3read.1 $(PREFIX)/share/man/man1
|
||||
$(LN) -sf f3read.1 $(PREFIX)/share/man/man1/f3write.1
|
||||
$(INSTALL) -d $(DESTDIR)$(PREFIX)/bin
|
||||
$(INSTALL) -oroot -groot -m755 $(TARGETS) $(DESTDIR)$(PREFIX)/bin
|
||||
$(INSTALL) -d $(DESTDIR)$(PREFIX)/share/man/man1
|
||||
$(INSTALL) -oroot -groot -m644 f3read.1 $(DESTDIR)$(PREFIX)/share/man/man1
|
||||
$(LN) -sf f3read.1 $(DESTDIR)$(PREFIX)/share/man/man1/f3write.1
|
||||
|
||||
install-extra: extra
|
||||
$(INSTALL) -d $(PREFIX)/bin
|
||||
$(INSTALL) -oroot -groot -m755 $(EXTRA_TARGETS) $(PREFIX)/bin
|
||||
$(INSTALL) -d $(DESTDIR)$(PREFIX)/bin
|
||||
$(INSTALL) -oroot -groot -m755 $(EXTRA_TARGETS) $(DESTDIR)$(PREFIX)/bin
|
||||
|
||||
f3write: utils.o f3write.o
|
||||
$(CC) -o $@ $^ $(LDFLAGS) -lm
|
||||
|
4
f3read.c
4
f3read.c
@ -134,7 +134,7 @@ static void validate_file(const char *path, int number,
|
||||
int final_errno;
|
||||
struct timeval t1, t2;
|
||||
/* Progress time. */
|
||||
struct timeval pt1 = { .tv_sec = -1000, .tv_usec = 0 };
|
||||
struct timeval pt1;
|
||||
|
||||
*ptr_ok = *ptr_corrupted = *ptr_changed = *ptr_overwritten = 0;
|
||||
|
||||
@ -164,6 +164,8 @@ static void validate_file(const char *path, int number,
|
||||
|
||||
/* Obtain initial time. */
|
||||
assert(!gettimeofday(&t1, NULL));
|
||||
pt1 = t1;
|
||||
pt1.tv_sec -= 1000;
|
||||
/* Help the kernel to help us. */
|
||||
assert(!posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user