summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-04-29 12:41:27 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-04-29 16:38:14 +1000
commit6021af4fd38d2a712dca42a3cacf8537007fd160 (patch)
tree23673e8e5aa8f75c3b5635957dc92231f81fd2c1 /source4
parent724915f721819705c7cf5c850a24b32f815c07e3 (diff)
downloadsamba-6021af4fd38d2a712dca42a3cacf8537007fd160.tar.gz
samba-6021af4fd38d2a712dca42a3cacf8537007fd160.tar.bz2
samba-6021af4fd38d2a712dca42a3cacf8537007fd160.zip
libcli/smb Move attrib_string in common
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/raw/rawfile.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/source4/libcli/raw/rawfile.c b/source4/libcli/raw/rawfile.c
index 5797540edd..626067a2a2 100644
--- a/source4/libcli/raw/rawfile.c
+++ b/source4/libcli/raw/rawfile.c
@@ -29,52 +29,6 @@
if (!req) return NULL; \
} while (0)
-/**
- Return a string representing a CIFS attribute for a file.
-**/
-char *attrib_string(TALLOC_CTX *mem_ctx, uint32_t attrib)
-{
- int i, len;
- const struct {
- char c;
- uint16_t attr;
- } attr_strs[] = {
- {'V', FILE_ATTRIBUTE_VOLUME},
- {'D', FILE_ATTRIBUTE_DIRECTORY},
- {'A', FILE_ATTRIBUTE_ARCHIVE},
- {'H', FILE_ATTRIBUTE_HIDDEN},
- {'S', FILE_ATTRIBUTE_SYSTEM},
- {'N', FILE_ATTRIBUTE_NORMAL},
- {'R', FILE_ATTRIBUTE_READONLY},
- {'d', FILE_ATTRIBUTE_DEVICE},
- {'t', FILE_ATTRIBUTE_TEMPORARY},
- {'s', FILE_ATTRIBUTE_SPARSE},
- {'r', FILE_ATTRIBUTE_REPARSE_POINT},
- {'c', FILE_ATTRIBUTE_COMPRESSED},
- {'o', FILE_ATTRIBUTE_OFFLINE},
- {'n', FILE_ATTRIBUTE_NONINDEXED},
- {'e', FILE_ATTRIBUTE_ENCRYPTED}
- };
- char *ret;
-
- ret = talloc_array(mem_ctx, char, ARRAY_SIZE(attr_strs)+1);
- if (!ret) {
- return NULL;
- }
-
- for (len=i=0; i<ARRAY_SIZE(attr_strs); i++) {
- if (attrib & attr_strs[i].attr) {
- ret[len++] = attr_strs[i].c;
- }
- }
-
- ret[len] = 0;
-
- talloc_set_name_const(ret, ret);
-
- return ret;
-}
-
/****************************************************************************
Rename a file - async interface
****************************************************************************/