https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269190

Konstantin Belousov <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Konstantin Belousov <[email protected]> ---
WRT the stat(1) patch, why do you _not_ pass S_IFBLK when the device is the
block device?  IMO it is more correct to do the following:

 #if HAVE_DEVNAME
-    sdata = (what == SHOW_st_dev) ?
-        devname(st->st_dev, S_IFBLK) :
-        devname(st->st_rdev, 
-        S_ISCHR(st->st_mode) ? S_IFCHR :
-        S_ISBLK(st->st_mode) ? S_IFBLK :
-        0U);
-    if (sdata == NULL)
-       sdata = "???";
+     sdata = devname(what == SHOW_st_dev ? st->st_dev :
+         st->st_rdev, S_ISCHR(st->st_mode) ? S_IFCHR :
+         (S_ISBLK(st->st_mode) ? S_IFBLK : 0));
 #endif /* HAVE_DEVNAME */

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to