summaryrefslogtreecommitdiff
path: root/usr/src/cmd/file/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd/file/file.c')
-rw-r--r--usr/src/cmd/file/file.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/usr/src/cmd/file/file.c b/usr/src/cmd/file/file.c
index 64379f3919..fa35a36406 100644
--- a/usr/src/cmd/file/file.c
+++ b/usr/src/cmd/file/file.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
-/* All Rights Reserved */
+/* All Rights Reserved */
/* Copyright (c) 1987, 1988 Microsoft Corporation */
@@ -614,7 +614,7 @@ spcl:
* be applied before context-sensitive tests, to avoid
* false context-sensitive matches.
*
- * Returns -1 on error which should result in error (non-zero)
+ * Returns -1 on error which should result in error (non-zero)
* exit status for the file utility.
* Returns 0 if no matching file type found.
* Returns 1 if matching file type found.
@@ -853,7 +853,8 @@ notas:
for (i = 0; i < Max; /* null */)
if (fbuf[i] & 0200) {
IS_ascii = 0;
- if (fbuf[0] == '\100' && fbuf[1] == '\357') {
+ if ((fbuf[0] == '\100') &&
+ ((uchar_t)fbuf[1] == (uchar_t)'\357')) {
(void) printf(gettext("troff output\n"));
return;
}
@@ -1330,6 +1331,10 @@ elf_check(char *file)
if (version == 1)
(void) printf(" %s %d", gettext("Version"), version);
+ if (EInfo.kmod) {
+ (void) printf(", %s", gettext("kernel module"));
+ }
+
/* Print Flags */
print_elf_flags(EInfo);
@@ -1483,9 +1488,10 @@ ascom(void)
return (1);
}
+/* look for "1hddddd" where d is a digit */
static int
sccs(void)
-{ /* look for "1hddddd" where d is a digit */
+{
register int j;
if (fbuf[0] == 1 && fbuf[1] == 'h') {