diff options
author | dim <dim@FreeBSD.org> | 2014-12-11 19:27:27 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2014-12-11 19:27:27 +0000 |
commit | da65ea02a341dd797c46b6987753bc1453982b36 (patch) | |
tree | d9a72217c1d2c4dcfef27a2fd2078dd4b3f69a64 /contrib/file/src/fsmagic.c | |
parent | 4cba228708753c1128b75a2c25c0dda582a9913a (diff) | |
parent | dc1c036751105b0a801375ba642278a13543bf7c (diff) | |
download | FreeBSD-src-da65ea02a341dd797c46b6987753bc1453982b36.zip FreeBSD-src-da65ea02a341dd797c46b6987753bc1453982b36.tar.gz |
Merge ^/head r275685 through r275714.
Diffstat (limited to 'contrib/file/src/fsmagic.c')
-rw-r--r-- | contrib/file/src/fsmagic.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/file/src/fsmagic.c b/contrib/file/src/fsmagic.c index ef5492f..1e8fd74 100644 --- a/contrib/file/src/fsmagic.c +++ b/contrib/file/src/fsmagic.c @@ -32,7 +32,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: fsmagic.c,v 1.73 2014/05/14 23:15:42 christos Exp $") +FILE_RCSID("@(#)$File: fsmagic.c,v 1.75 2014/12/04 15:56:46 christos Exp $") #endif /* lint */ #include "magic.h" @@ -75,10 +75,10 @@ bad_link(struct magic_set *ms, int err, char *buf) else if (!mime) { if (ms->flags & MAGIC_ERROR) { file_error(ms, err, - "broken symbolic link to `%s'", buf); + "broken symbolic link to %s", buf); return -1; } - if (file_printf(ms, "broken symbolic link to `%s'", buf) == -1) + if (file_printf(ms, "broken symbolic link to %s", buf) == -1) return -1; } return 1; @@ -129,7 +129,7 @@ file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb) #ifdef WIN32 { - HANDLE hFile = CreateFile(fn, 0, FILE_SHARE_DELETE | + HANDLE hFile = CreateFile((LPCSTR)fn, 0, FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL); if (hFile != INVALID_HANDLE_VALUE) { @@ -352,7 +352,7 @@ file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb) if (mime) { if (handle_mime(ms, mime, "symlink") == -1) return -1; - } else if (file_printf(ms, "%ssymbolic link to `%s'", + } else if (file_printf(ms, "%ssymbolic link to %s", COMMA, buf) == -1) return -1; } |