From: Karel Zak Date: Fri, 22 Jan 2016 18:38:18 +0000 (+0100) Subject: lsblk: remove useless warnings X-Git-Tag: v2.28-rc1~169 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=63107d1bbc4e304ddfc4ffee9ce1d6152a7d63a6;p=thirdparty%2Futil-linux.git lsblk: remove useless warnings It's seems better to keep the warnings only in the debug output. Reported-by: Kay Sievers Signed-off-by: Karel Zak --- diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c index 71f8bd6a74..dd0f0241f4 100644 --- a/misc-utils/lsblk.c +++ b/misc-utils/lsblk.c @@ -1172,7 +1172,7 @@ static int set_cxt(struct blkdev_cxt *cxt, cxt->filename = get_device_path(cxt); if (!cxt->filename) { - warnx(_("%s: failed to get device path"), cxt->name); + DBG(CXT, ul_debugobj(cxt, "%s: failed to get device path", cxt->name)); return -1; } DBG(CXT, ul_debugobj(cxt, "%s: filename=%s", cxt->name, cxt->filename)); @@ -1180,20 +1180,20 @@ static int set_cxt(struct blkdev_cxt *cxt, devno = sysfs_devname_to_devno(cxt->name, wholedisk ? wholedisk->name : NULL); if (!devno) { - warnx(_("%s: unknown device name"), cxt->name); + DBG(CXT, ul_debugobj(cxt, "%s: unknown device name", cxt->name)); return -1; } if (lsblk->inverse) { if (sysfs_init(&cxt->sysfs, devno, wholedisk ? &wholedisk->sysfs : NULL)) { - warnx(_("%s: failed to initialize sysfs handler"), cxt->name); + DBG(CXT, ul_debugobj(cxt, "%s: failed to initialize sysfs handler", cxt->name)); return -1; } if (parent) parent->sysfs.parent = &cxt->sysfs; } else { if (sysfs_init(&cxt->sysfs, devno, parent ? &parent->sysfs : NULL)) { - warnx(_("%s: failed to initialize sysfs handler"), cxt->name); + DBG(CXT, ul_debugobj(cxt, "%s: failed to initialize sysfs handler", cxt->name)); return -1; } } @@ -1217,7 +1217,7 @@ static int set_cxt(struct blkdev_cxt *cxt, if (is_dm(cxt->name)) { cxt->dm_name = sysfs_strdup(&cxt->sysfs, "dm/name"); if (!cxt->dm_name) { - warnx(_("%s: failed to get dm name"), cxt->name); + DBG(CXT, ul_debugobj(cxt, "%s: failed to get dm name", cxt->name)); return -1; } }