summaryrefslogtreecommitdiff
path: root/src/udev
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-08-06 01:12:45 +0200
committerDaniel Mack <github@zonque.org>2015-08-06 01:12:45 +0200
commit7c43bfecfa2d07374b6f805cc03c9571d1d3e1fc (patch)
tree9faacdee98f007aaaf0f14efd49326a6b583c99c /src/udev
parentc2f147382d8ad174dae0a9b60088807a07dc6415 (diff)
parent756775814cf69471f74ce853745bba69f2ba94ef (diff)
Merge pull request #883 from phomes/bool_vs_error_codes
tree-wide: do not return error codes as bool
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/cdrom_id/cdrom_id.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/udev/cdrom_id/cdrom_id.c b/src/udev/cdrom_id/cdrom_id.c
index 3d74ae50f1..775da0355d 100644
--- a/src/udev/cdrom_id/cdrom_id.c
+++ b/src/udev/cdrom_id/cdrom_id.c
@@ -106,11 +106,11 @@ static bool is_mounted(const char *device)
bool mounted = false;
if (stat(device, &statbuf) < 0)
- return -ENODEV;
+ return false;
fp = fopen("/proc/self/mountinfo", "re");
if (fp == NULL)
- return -ENOSYS;
+ return false;
while (fscanf(fp, "%*s %*s %i:%i %*[^\n]", &maj, &min) == 2) {
if (makedev(maj, min) == statbuf.st_rdev) {
mounted = true;