diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-10-08 18:22:28 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-10-08 18:22:28 +0200 |
commit | c8f26f42e2c81d03ff6e845afa12eb3432e794b8 (patch) | |
tree | cc9f39671ae21b84bf79f6c8ad0e70ba55b15f1e /src | |
parent | 6daf4f9001d87da9e92c04ff606b454c209f0951 (diff) |
util: don't specifically check for the /dev/null major/minor, just check whether something is a char or block device
Diffstat (limited to 'src')
-rw-r--r-- | src/util.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/util.c b/src/util.c index 12c19b353b..d09e447776 100644 --- a/src/util.c +++ b/src/util.c @@ -3319,10 +3319,7 @@ bool null_or_empty(struct stat *st) { if (S_ISREG(st->st_mode) && st->st_size <= 0) return true; - /* /dev/null has major/minor of 1:3 */ - if (S_ISCHR(st->st_mode) && - major(st->st_rdev) == 1 && - minor(st->st_rdev) == 3) + if (S_ISCHR(st->st_mode) || S_ISBLK(st->st_mode)) return true; return false; |