chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fsck: include device name in the message about missing fsck
[elogind.git]
/
src
/
shared
/
util.c
diff --git
a/src/shared/util.c
b/src/shared/util.c
index 83a674aa8b16ba5e141f1d5aa97cdc145d497c6d..0c273943e7e671d20439dd7f7962e5c382d50032 100644
(file)
--- a/
src/shared/util.c
+++ b/
src/shared/util.c
@@
-3364,17
+3364,17
@@
int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gi
return -errno;
}
return -errno;
}
- if (uid != (uid_t)
-1 || gid != (gid_t)
-1) {
+ if (uid != (uid_t)
-1 || gid != (gid_t)
-1) {
r = fchown(fd, uid, gid);
if (r < 0)
return -errno;
}
r = fchown(fd, uid, gid);
if (r < 0)
return -errno;
}
- if (stamp != (usec_t)-1) {
+ if (stamp != (usec_t)
-1) {
struct timespec ts[2];
timespec_store(&ts[0], stamp);
struct timespec ts[2];
timespec_store(&ts[0], stamp);
- t
imespec_store(&ts[1], stamp)
;
+ t
s[1] = ts[0]
;
r = futimens(fd, ts);
} else
r = futimens(fd, NULL);
r = futimens(fd, ts);
} else
r = futimens(fd, NULL);
@@
-3385,7
+3385,7
@@
int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gi
}
int touch(const char *path) {
}
int touch(const char *path) {
- return touch_file(path, false,
-1, -1,
-1, 0);
+ return touch_file(path, false,
(usec_t) -1, (uid_t) -1, (gid_t)
-1, 0);
}
char *unquote(const char *s, const char* quotes) {
}
char *unquote(const char *s, const char* quotes) {