Default unknowns to application/octet-stream instead of x-not-regular-file.
authorbentley <bentley@openbsd.org>
Thu, 30 Nov 2017 11:10:07 +0000 (11:10 +0000)
committerbentley <bentley@openbsd.org>
Thu, 30 Nov 2017 11:10:07 +0000 (11:10 +0000)
This makes more sense and matches what the latest "other" file(1) now does.

ok nicm@

usr.bin/file/file.c

index b98643d..acdc1d8 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.64 2017/07/01 21:07:13 brynet Exp $ */
+/* $OpenBSD: file.c,v 1.65 2017/11/30 11:10:07 bentley Exp $ */
 
 /*
  * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -515,7 +515,7 @@ static int
 try_unknown(struct input_file *inf)
 {
        if (iflag)
-               xasprintf(&inf->result, "application/x-not-regular-file");
+               xasprintf(&inf->result, "application/octet-stream");
        else
                xasprintf(&inf->result, "data");
        return (1);