diff options
Diffstat (limited to 'util-linux/fdisk.c')
-rw-r--r-- | util-linux/fdisk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c index 702567a71..b1f0b65c6 100644 --- a/util-linux/fdisk.c +++ b/util-linux/fdisk.c @@ -2684,7 +2684,7 @@ is_ide_cdrom_or_tape(const char *device) return 0; snprintf(buf, sizeof(buf), "/proc/ide/%s/media", device+5); - procf = fopen(buf, "r"); + procf = fopen_for_read(buf); if (procf != NULL && fgets(buf, sizeof(buf), procf)) is_ide = (!strncmp(buf, "cdrom", 5) || !strncmp(buf, "tape", 4)); |