aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/fstat
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@FreeBSD.org>2011-06-18 21:53:36 +0000
committerJilles Tjoelker <jilles@FreeBSD.org>2011-06-18 21:53:36 +0000
commit1696274411f145aac745b146cc3edc2fd32740ae (patch)
tree399ca3a028a66d945a5aa352890ed742ecf774f4 /usr.bin/fstat
parentb0766d1fc5489807e8f02f8d43a8aaf56221c02c (diff)
downloadsrc-1696274411f145aac745b146cc3edc2fd32740ae.tar.gz
src-1696274411f145aac745b146cc3edc2fd32740ae.zip
fuser: Fix skipping "SIG" on signal names (-s).
The code did !strncasecmp(str, "sig", 4) which is not useful. Also change "sig" to "SIG" matching the uppercase signal names as of r218285. This has little effect because fuser does not enable locale.
Notes
Notes: svn path=/head/; revision=223271
Diffstat (limited to 'usr.bin/fstat')
-rw-r--r--usr.bin/fstat/fuser.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/fstat/fuser.c b/usr.bin/fstat/fuser.c
index 02975b38c3da..364d57c8aa11 100644
--- a/usr.bin/fstat/fuser.c
+++ b/usr.bin/fstat/fuser.c
@@ -358,9 +358,8 @@ str2sig(const char *str)
{
int i;
-#define SIGPREFIX "sig"
- if (!strncasecmp(str, SIGPREFIX, sizeof(SIGPREFIX)))
- str += sizeof(SIGPREFIX);
+ if (!strncasecmp(str, "SIG", 3))
+ str += 3;
for (i = 1; i < sys_nsig; i++) {
if (!strcasecmp(sys_signame[i], str))
return (i);