From: Christoph Hellwig Date: Mon, 15 Apr 2024 23:07:47 +0000 (-0700) Subject: libxfs: remove the S_ISREG check from blkid_get_topology X-Git-Tag: v6.8.0~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=62aa97ee7abc9f78fd668f447ec919ac0152d865;p=thirdparty%2Fxfsprogs-dev.git libxfs: remove the S_ISREG check from blkid_get_topology The only caller already performs the exact same check. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- diff --git a/libxfs/topology.c b/libxfs/topology.c index 63f0b96a..706eed02 100644 --- a/libxfs/topology.c +++ b/libxfs/topology.c @@ -178,15 +178,6 @@ blkid_get_topology( { blkid_topology tp; blkid_probe pr; - struct stat statbuf; - - /* can't get topology info from a file */ - if (!stat(device, &statbuf) && S_ISREG(statbuf.st_mode)) { - fprintf(stderr, - _("%s: Warning: trying to probe topology of a file %s!\n"), - progname, device); - return; - } pr = blkid_new_probe_from_filename(device); if (!pr)