diff options
Diffstat (limited to 'e2fsprogs')
-rw-r--r-- | e2fsprogs/old_e2fsprogs/blkid/read.c | 4 | ||||
-rw-r--r-- | e2fsprogs/old_e2fsprogs/blkid/save.c | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/e2fsprogs/old_e2fsprogs/blkid/read.c b/e2fsprogs/old_e2fsprogs/blkid/read.c index 67bc8ee44..f795a5d14 100644 --- a/e2fsprogs/old_e2fsprogs/blkid/read.c +++ b/e2fsprogs/old_e2fsprogs/blkid/read.c @@ -374,9 +374,7 @@ void blkid_read_cache(blkid_cache cache) DBG(DEBUG_CACHE, printf("reading cache file %s\n", cache->bic_filename)); - file = fdopen(fd, "r"); - if (!file) - goto errout; + file = xfdopen_for_read(fd); while (fgets(buf, sizeof(buf), file)) { blkid_dev dev; diff --git a/e2fsprogs/old_e2fsprogs/blkid/save.c b/e2fsprogs/old_e2fsprogs/blkid/save.c index 3600260e2..e60cca445 100644 --- a/e2fsprogs/old_e2fsprogs/blkid/save.c +++ b/e2fsprogs/old_e2fsprogs/blkid/save.c @@ -95,7 +95,7 @@ int blkid_flush_cache(blkid_cache cache) sprintf(tmp, "%s-XXXXXX", filename); fd = mkstemp(tmp); if (fd >= 0) { - file = fdopen(fd, "w"); + file = xfdopen_for_write(fd); opened = tmp; } fchmod(fd, 0644); |