]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libfdisk: cleanup warning messages
authorKarel Zak <kzak@redhat.com>
Fri, 4 Oct 2013 10:07:12 +0000 (12:07 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 4 Oct 2013 10:07:12 +0000 (12:07 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk/src/bsd.c

index 19279ad9345a054d05cd0f30f668eb06351b4819..3ea06e860c882fcc54078c06f344e6d9644bd612 100644 (file)
@@ -518,12 +518,12 @@ static int bsd_get_bootstrap(struct fdisk_context *cxt,
        int fd;
 
        if ((fd = open(path, O_RDONLY)) < 0) {
-               fdisk_warn(cxt, _("open failed %s"), path);
+               fdisk_warn(cxt, _("cannot open %s"), path);
                return -errno;
        }
 
        if (read_all(fd, ptr, size) != size) {
-               fdisk_warn(cxt, _("read failed %s"), path);
+               fdisk_warn(cxt, _("cannot read %s"), path);
                close(fd);
                return -errno;
        }
@@ -590,12 +590,12 @@ int fdisk_bsd_write_bootstrap(struct fdisk_context *cxt)
        alpha_bootblock_checksum(l->bsdbuffer);
 #endif
        if (lseek(cxt->dev_fd, (off_t) sector * DEFAULT_SECTOR_SIZE, SEEK_SET) == -1) {
-               fdisk_warn(cxt, _("seek failed %s"), cxt->dev_path);
+               fdisk_warn(cxt, _("seek on %s failed"), cxt->dev_path);
                rc = -errno;
                goto done;
        }
        if (write_all(cxt->dev_fd, l->bsdbuffer, BSD_BBSIZE)) {
-               fdisk_warn(cxt, _("write failed %s"), cxt->dev_path);
+               fdisk_warn(cxt, _("cannot write %s"), cxt->dev_path);
                rc = -errno;
                goto done;
        }
@@ -758,11 +758,11 @@ static int bsd_write_disklabel(struct fdisk_context *cxt)
        alpha_bootblock_checksum(l->bsdbuffer);
 #endif
        if (lseek(cxt->dev_fd, offset, SEEK_SET) == -1) {
-               fdisk_warn(cxt, _("seek failed: %d"), cxt->dev_path);
+               fdisk_warn(cxt, _("seek on %s failed"), cxt->dev_path);
                return -errno;
        }
        if (write_all(cxt->dev_fd, l->bsdbuffer, sizeof(l->bsdbuffer))) {
-               fdisk_warn(cxt, _("write failed: %d"), cxt->dev_path);
+               fdisk_warn(cxt, _("cannot write %s"), cxt->dev_path);
                return -errno;
        }
        sync_disks(cxt);