summaryrefslogtreecommitdiff
path: root/src/shared/generator.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-03-06 21:14:26 +0100
committerLennart Poettering <lennart@poettering.net>2014-03-07 02:40:24 +0100
commit6db615c17ee7a434f9e0c40d67a1f833d8f3cc9d (patch)
tree02648e07251e322648fb98fc92afb791bb25a797 /src/shared/generator.c
parent82ed60080d327d7301fcd55f5a1f8511f894b9d5 (diff)
fstab-generator: merge /proc/cmdline parsing loops into one
Diffstat (limited to 'src/shared/generator.c')
-rw-r--r--src/shared/generator.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/shared/generator.c b/src/shared/generator.c
index 49647c1ab6..61103031db 100644
--- a/src/shared/generator.c
+++ b/src/shared/generator.c
@@ -32,20 +32,23 @@ int generator_write_fsck_deps(
const char *dest,
const char *what,
const char *where,
- const char *type) {
+ const char *fstype) {
assert(f);
+ assert(dest);
+ assert(what);
+ assert(where);
if (!is_device_path(what)) {
log_warning("Checking was requested for \"%s\", but it is not a device.", what);
return 0;
}
- if (type && !streq(type, "auto")) {
+ if (!isempty(fstype) && !streq(fstype, "auto")) {
const char *checker;
int r;
- checker = strappenda("/sbin/fsck.", type);
+ checker = strappenda("/sbin/fsck.", fstype);
r = access(checker, X_OK);
if (r < 0) {
log_warning("Checking was requested for %s, but %s cannot be used: %m", what, checker);