X-Git-Url: http://git.archive.openwrt.org/?p=project%2Ffstools.git;a=blobdiff_plain;f=libfstools%2Fmtd.c;fp=libfstools%2Fmtd.c;h=77c71eeb29a3ba7a67c42514b5e17e324baf53d4;hp=2603a15303ed589233b106bcb3a3c6bdd85f8b82;hb=ef2cc03b52ba2d3d19de7c9e72e0131eab631e5a;hpb=98fd5b40a70dc18e56134b0b48d224698228943e diff --git a/libfstools/mtd.c b/libfstools/mtd.c index 2603a15..77c71ee 100644 --- a/libfstools/mtd.c +++ b/libfstools/mtd.c @@ -198,7 +198,7 @@ static int mtd_volume_identify(struct volume *v) sz = read(p->fd, &deadc0de, sizeof(deadc0de)); if (sz != sizeof(deadc0de)) { - ULOG_ERR("reading %s failed: %s\n", v->name, strerror(errno)); + ULOG_ERR("reading %s failed: %m\n", v->name); return -1; } @@ -275,7 +275,7 @@ static int mtd_volume_init(struct volume *v) ret = ioctl(p->fd, MEMGETINFO, &mtdinfo); if (ret) { - ULOG_ERR("ioctl(%d, MEMGETINFO) failed: %s\n", p->fd, strerror(errno)); + ULOG_ERR("ioctl(%d, MEMGETINFO) failed: %m\n", p->fd); } else { struct erase_info_user mtdlock;