aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/fstyp/ntfs.c
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2019-12-23 20:23:02 +0000
committerConrad Meyer <cem@FreeBSD.org>2019-12-23 20:23:02 +0000
commit5ab1cb52b21fdc5524bd970e9b5cdff21a5bcabf (patch)
tree7a49f7519d871effe3ac2a3ab08d9ae6a2280856 /usr.sbin/fstyp/ntfs.c
parent107eff5176710f05a00f14a6058f54197bd59a10 (diff)
downloadsrc-5ab1cb52b21fdc5524bd970e9b5cdff21a5bcabf.tar.gz
src-5ab1cb52b21fdc5524bd970e9b5cdff21a5bcabf.zip
Notes
Diffstat (limited to 'usr.sbin/fstyp/ntfs.c')
-rw-r--r--usr.sbin/fstyp/ntfs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/usr.sbin/fstyp/ntfs.c b/usr.sbin/fstyp/ntfs.c
index d7e29c23fe85..440f5716392f 100644
--- a/usr.sbin/fstyp/ntfs.c
+++ b/usr.sbin/fstyp/ntfs.c
@@ -32,7 +32,9 @@
__FBSDID("$FreeBSD$");
#include <err.h>
+#ifdef WITH_ICONV
#include <iconv.h>
+#endif
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
@@ -94,6 +96,7 @@ struct ntfs_bootfile {
uint32_t bf_volsn;
} __packed;
+#ifdef WITH_ICONV
static void
convert_label(const void *label /* LE */, size_t labellen, char *label_out,
size_t label_sz)
@@ -125,6 +128,7 @@ convert_label(const void *label /* LE */, size_t labellen, char *label_out,
iconv_close(cd);
}
+#endif
int
fstyp_ntfs(FILE *fp, char *label, size_t size)
@@ -142,6 +146,7 @@ fstyp_ntfs(FILE *fp, char *label, size_t size)
bf = (struct ntfs_bootfile *)read_buf(fp, 0, 512);
if (bf == NULL || strncmp(bf->bf_sysid, "NTFS ", 8) != 0)
goto fail;
+#ifdef WITH_ICONV
if (!show_label)
goto ok;
@@ -171,6 +176,7 @@ fstyp_ntfs(FILE *fp, char *label, size_t size)
}
ok:
+#endif /* WITH_ICONV */
free(bf);
free(filerecp);