summaryrefslogtreecommitdiff
path: root/include/uapi/linux/cifs
diff options
context:
space:
mode:
authorScott Lovenberg <scott.lovenberg@gmail.com>2013-08-09 08:47:17 -0400
committerSteve French <smfrench@gmail.com>2013-09-08 14:34:11 -0500
commit8c3a2b4c420c5b988005b8697b7404ced076aaaa (patch)
treea680e656fb9bd7632c77ccbef89d24ce805c9ef5 /include/uapi/linux/cifs
parentd244bf2dfbebfded05f494ffd53659fa7b1e32c1 (diff)
cifs: Move string length definitions to uapi
The max string length definitions for user name, domain name, password, and share name have been moved into their own header file in uapi so the mount helper can use autoconf to define them instead of keeping the kernel side and userland side definitions in sync manually. The names have also been standardized with a "CIFS" prefix and "LEN" suffix. Signed-off-by: Scott Lovenberg <scott.lovenberg@gmail.com> Reviewed-by: Chen Gang <gang.chen@asianux.com> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'include/uapi/linux/cifs')
-rw-r--r--include/uapi/linux/cifs/cifs_mount.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/uapi/linux/cifs/cifs_mount.h b/include/uapi/linux/cifs/cifs_mount.h
new file mode 100644
index 000000000000..19063fef6219
--- /dev/null
+++ b/include/uapi/linux/cifs/cifs_mount.h
@@ -0,0 +1,25 @@
+/*
+ * include/uapi/linux/cifs/cifs_mount.h
+ *
+ * Author(s): Scott Lovenberg (scott.lovenberg@gmail.com)
+ *
+ * This library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
+ * the GNU Lesser General Public License for more details.
+ */
+#ifndef _CIFS_MOUNT_H
+#define _CIFS_MOUNT_H
+
+/* Max string lengths for cifs mounting options. */
+#define CIFS_MAX_DOMAINNAME_LEN 256 /* max fully qualified domain name */
+#define CIFS_MAX_USERNAME_LEN 256 /* reasonable max for current servers */
+#define CIFS_MAX_PASSWORD_LEN 512 /* Windows max seems to be 256 wide chars */
+#define CIFS_MAX_SHARE_LEN 80
+
+#endif /* _CIFS_MOUNT_H */