package/ntfs3-mount: check NTFS signature
Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
This commit is contained in:
parent
be12783ed2
commit
7da4916fef
@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ntfs3-mount
|
||||
PKG_RELEASE:=7
|
||||
PKG_RELEASE:=8
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
||||
@ -1,2 +1,9 @@
|
||||
#!/bin/sh
|
||||
if [[ "$1" != "-*" ]]; then
|
||||
head -c 11 "$1" | tail -c 8 | grep -Fwq 'NTFS ' || {
|
||||
echo "NTFS signature is missing." >&2
|
||||
exit 32
|
||||
}
|
||||
fi
|
||||
|
||||
mount -i -t ntfs3 -o iocharset=utf8,force "$@" || mount -i -t ntfs3 -o iocharset=utf8,ro "$@"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user