chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
6daf4f9
)
util: don't specifically check for the /dev/null major/minor, just check whether...
author
Lennart Poettering
<lennart@poettering.net>
Fri, 8 Oct 2010 16:22:28 +0000
(18:22 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Fri, 8 Oct 2010 16:22:28 +0000
(18:22 +0200)
src/util.c
patch
|
blob
|
history
diff --git
a/src/util.c
b/src/util.c
index 12c19b353b0f0e9b5883baacfca7ee681742db40..d09e44777671b298f02eac2f1f7beea3152e1891 100644
(file)
--- 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;