- don't free user-supplied string (via -e)
[oweals/busybox.git] / util-linux / fdisk.c
index eeef18e2fb2f958aba16c0b4232ab3da70521ef7..b1f0b65c636c9a57fc815344f83908c7a654bc1d 100644 (file)
@@ -83,9 +83,9 @@ struct partition {
        unsigned char size4[4];         /* nr of sectors in partition */
 } PACKED;
 
-static const char unable_to_open[] ALIGN1 = "cannot open %s";
-static const char unable_to_read[] ALIGN1 = "cannot read from %s";
-static const char unable_to_seek[] ALIGN1 = "cannot seek on %s";
+static const char unable_to_open[] ALIGN1 = "can't open %s";
+static const char unable_to_read[] ALIGN1 = "can't read from %s";
+static const char unable_to_seek[] ALIGN1 = "can't seek on %s";
 
 enum label_type {
        LABEL_DOS, LABEL_SUN, LABEL_SGI, LABEL_AIX, LABEL_OSF
@@ -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));