+++ /dev/null
-/*
- * $Id: codepage.c,v 1.8 2002-03-24 01:23:40 sibaz Exp $
- *
- * Copyright (c) 2000 Adrian Sun
- * All Rights Reserved. See COPYRIGHT.
- *
- * codepage support (based initially on some code from
- * julian@whistle.com)
- *
- * the strategy:
- * for single-byte maps, the codepage support devolves to a lookup
- * table for all possible 8-bit values. for double-byte maps,
- * the first byte is used as a hash index followed by a linked list of
- * values.
- *
- * the badumap specifies illegal characters. these are 8-bit values
- * with an associated rule field. here are the rules:
- *
- * illegal values: 0 is the only illegal value. no translation will
- * occur in those cases.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif /* HAVE_CONFIG_H */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif /* HAVE_FCNTL_H */
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-#include <atalk/logger.h>
-
-#include <netatalk/endian.h>
-
-#include "globals.h"
-#include "volume.h"
-#include "codepage.h"
-
-#define MAPSIZE 256
-
-/* deal with linked lists */
-#define CP_INIT(a) (a)->next = (a)->prev = (a)
-#define CP_ADD(a, b) do { \
- (b)->next = (a)->next; \
- (b)->prev = (a); \
- (a)->next = (b); \
-} while (0)
-#define CP_REMOVE(a) do { \
- (a)->prev->next = (a)->next; \
- (a)->next->prev = (a)->prev; \
-} while (0)
-
-/* search for stuff */
-#if 0
-static __inline__ unsigned char *codepage_find(struct codepage *page,
- unsigned char *from)
-{
-}
-#endif
-
-static int add_code(struct codepage *page, unsigned char *from,
- unsigned char *to)
-{
-#if 0
- union codepage_val *ptr;
-#endif /* 0 */
-
- if (page->quantum < 1) /* no quantum given. don't do anything */
- return 1;
-
- if (page->quantum == 1) {
- page->map[*from].value = *to;
- return 0;
- }
-
-#if 0
- if (ptr = codepage_find(page->map, from)) {
-
- } else {
- unsigned char *space;
- ptr = map[*from].hash;
-
- space = (unsigned char *) malloc(sizeof(unsigned char)*quantum);
- if (!ptr->from) {
- } else {
- }
-
- map[*from].hash
- }
-#endif /* 0 */
- return 0;
-}
-
-static struct codepage *init_codepage(const int quantum)
-{
- struct codepage *cp;
-
- cp = (struct codepage *) malloc(sizeof(struct codepage));
- if (!cp)
- return NULL;
-
- if ((cp->map = (union codepage_val *)
- calloc(MAPSIZE, sizeof(union codepage_val))) == NULL) {
- free(cp);
- return NULL;
- }
-
- cp->quantum = quantum;
- return cp;
-}
-
-
-static void free_codepage(struct codepage *cp)
-{
- int i;
-
- if (!cp)
- return;
-
- if (cp->map) {
- if (cp->quantum > 1) {
- /* deal with any linked lists that may exist */
- for (i = 0; i < MAPSIZE; i++) {
- struct codepage_hash *ptr, *h;
-
- h = &cp->map[i].hash; /* we don't free this one */
- while ((ptr = h->prev) != h) {
- CP_REMOVE(ptr);
- free(ptr);
- }
- }
- }
- free(cp->map);
- }
- free(cp);
-}
-
-
-
-/* this is used by both codepages and generic mapping utilities. we
- * allocate enough space to map all 8-bit characters if necessary.
- * for double-byte mappings, we just use the table as a hash lookup.
- * if we don't match, we don't convert.
- */
-int codepage_init(struct vol *vol, const int rules,
- const int quantum)
-{
- if ((rules & CODEPAGE_RULE_UTOM) && !vol->v_utompage) {
- vol->v_utompage = init_codepage(quantum);
- if (!vol->v_utompage)
- goto err_utompage;
- }
-
- if ((rules & CODEPAGE_RULE_MTOU) && !vol->v_mtoupage) {
- vol->v_mtoupage = init_codepage(quantum);
- if (!vol->v_mtoupage) {
- goto err_mtoupage;
- }
- }
-
- if ((rules & CODEPAGE_RULE_BADU) && !vol->v_badumap) {
- vol->v_badumap = init_codepage(quantum);
- if (!vol->v_badumap)
- goto err_mtoupage;
- }
- return 0;
-
-err_mtoupage:
- free_codepage(vol->v_mtoupage);
- vol->v_mtoupage = NULL;
-
-err_utompage:
- free_codepage(vol->v_utompage);
- vol->v_utompage = NULL;
- return -1;
-}
-
-void codepage_free(struct vol *vol)
-{
- if (vol->v_utompage) {
- free_codepage(vol->v_utompage);
- vol->v_utompage = NULL;
- }
-
- if (vol->v_mtoupage) {
- free_codepage(vol->v_mtoupage);
- vol->v_mtoupage = NULL;
- }
-
- if (vol->v_badumap) {
- free_codepage(vol->v_badumap);
- vol->v_badumap = NULL;
- }
-}
-
-
-int codepage_read(struct vol *vol, const char *path)
-{
- unsigned char buf[CODEPAGE_FILE_HEADER_SIZE], *cur;
- u_int16_t id;
- int fd, i, quantum, rules;
-
- if ((fd = open(path, O_RDONLY)) < 0) {
- LOG(log_error, logtype_afpd, "%s: failed to open codepage", path);
- return -1;
- }
-
- /* Read the codepage file header. */
- if(read(fd, buf, sizeof(buf)) != sizeof(buf)) {
- LOG(log_error, logtype_afpd, "%s: failed to read codepage header", path);
- goto codepage_fail;
- }
-
- /* Check the file id */
- cur = buf;
- memcpy(&id, cur, sizeof(id));
- cur += sizeof(id);
- id = ntohs(id);
- if (id != CODEPAGE_FILE_ID) {
- LOG(log_error, logtype_afpd, "%s: not a codepage", path);
- goto codepage_fail;
- }
-
- /* check the version number */
- if (*cur++ != CODEPAGE_FILE_VERSION) {
- LOG(log_error, logtype_afpd, "%s: codepage version not supported", path);
- goto codepage_fail;
- }
-
- /* ignore namelen */
- cur++;
-
- /* find out the data quantum size. default to 1 if nothing's given. */
- quantum = *cur ? *cur : 1;
- cur++;
-
- /* rules used in this file. */
- rules = *cur++;
-
- if (codepage_init(vol, rules, quantum) < 0) {
- LOG(log_error, logtype_afpd, "%s: Unable to allocate memory", path);
- goto codepage_fail;
- }
-
- /* offset to data */
-
- /* skip to the start of the data */
- memcpy(&id, cur , sizeof(id));
- id = ntohs(id);
- lseek(fd, id, SEEK_SET);
-
- /* mtoupage is the the equivalent of samba's unix2dos. utompage is
- * the equivalent of dos2unix. it's a little confusing due to a
- * desire to match up with mtoupath and utompath.
- * NOTE: we allow codepages to specify 7-bit mappings if they want.
- */
- i = 1 + 2*quantum;
- while (read(fd, buf, i) == i) {
- if (*buf & CODEPAGE_RULE_MTOU) {
- if (add_code(vol->v_mtoupage, buf + 1, buf + 1 + quantum) < 0) {
- LOG(log_error, logtype_afpd, "unable to allocate memory for mtoupage");
- break;
- }
- }
-
- if (*buf & CODEPAGE_RULE_UTOM) {
- if (add_code(vol->v_utompage, buf + 1 + quantum, buf + 1) < 0) {
- LOG(log_error, logtype_afpd, "unable to allocate memory for utompage");
- break;
- }
- }
-
- /* we only look at the first character here. if we need to
- * do so, we can always use the quantum to expand the
- * available flags. */
- if (*buf & CODEPAGE_RULE_BADU)
- vol->v_badumap->map[*(buf + 1)].value = *(buf + 1 + quantum);
- }
- close(fd);
- return 0;
-
-codepage_fail:
- close(fd);
- return -1;
-}
+++ /dev/null
-/*
- * $Id: makecode.c,v 1.7 2002-12-01 00:44:12 srittau Exp $
- *
- * quick-and-dirty way of creating code pages
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif /* HAVE_CONFIG_H */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-
-#include <netatalk/endian.h>
-#include "codepage.h"
-
-/* map of cp10000 (mac roman) to iso-latin-1 */
-static const unsigned char mac_to_isolatin1_map[] = {
- 0xC4, 0xC5, 0xC7, 0xC9, 0xD1, 0xD6, 0xDC, 0xE1,
- 0xE0, 0xE2, 0xE4, 0xE3, 0xE5, 0xE7, 0xE9, 0xE8,
- 0xEA, 0xEB, 0xED, 0xEC, 0xEE, 0xEF, 0xF1, 0xF3,
- 0xF2, 0xF4, 0xF6, 0xF5, 0xFA, 0xF9, 0xFB, 0xFC,
- 0x00, 0xB0, 0xA2, 0xA3, 0xA7, 0xB7, 0xB6, 0xDF,
- 0xAE, 0xA9, 0x00, 0xB4, 0xA8, 0x00, 0xC6, 0xD8,
- 0x00, 0xB1, 0x00, 0x00, 0xA5, 0xB5, 0xF0, 0x00,
- 0x00, 0x00, 0x00, 0xAA, 0xBA, 0x00, 0xE6, 0xF8,
- 0xBF, 0xA1, 0xAC, 0x00, 0x00, 0x00, 0x00, 0xAB,
- 0xBB, 0x00, 0xA0, 0xC0, 0xC3, 0xD5, 0x00, 0x00,
- 0xAD, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF7, 0x00,
- 0xFF, 0x00, 0x00, 0xA4, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0xB8, 0x00, 0x00, 0xC2, 0xCA, 0xC1,
- 0xCB, 0xC8, 0xCD, 0xCE, 0xCF, 0xCC, 0xD3, 0xD4,
- 0x00, 0xD2, 0xDA, 0xDB, 0xD9
- /*, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00 */
-};
-
-/* map of cp10000 (mac roman) to iso-latin-1 adapted */
-static const unsigned char mac_to_isolatin1_adapted_map[] = {
- 0xC4, 0xC5, 0xC7, 0xC9, 0xD1, 0xD6, 0xDC, 0xE1,
- 0xE0, 0xE2, 0xE4, 0xE3, 0xE5, 0xE7, 0xE9, 0xE8,
- 0xEA, 0xEB, 0xED, 0xEC, 0xEE, 0xEF, 0xF1, 0xF3,
- 0xF2, 0xF4, 0xF6, 0xF5, 0xFA, 0xF9, 0xFB, 0xFC,
- 0x00, 0xB0, 0xA2, 0xA3, 0xA7, 0xB7, 0xB6, 0xDF,
- 0xAE, 0xA9, 0xFE, 0xB4, 0xA8, 0x00, 0xC6, 0xD8,
- 0x00, 0xB1, 0x00, 0x00, 0xA5, 0xB5, 0xF0, 0x00,
- 0x00, 0x00, 0x00, 0xAA, 0xBA, 0x00, 0xE6, 0xF8,
- 0xBF, 0xA1, 0xAC, 0x00, 0xFD, 0x00, 0x00, 0xAB,
- 0xBB, 0x00, 0xA0, 0xC0, 0xC3, 0xD5, 0x00, 0x00,
- 0xAD, 0xAF, 0xB2, 0xB3, 0xDD, 0xDE, 0xF7, 0xB0,
- 0xFF, 0x00, 0x00, 0xA4, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0xB8, 0x00, 0x00, 0xC2, 0xCA, 0xC1,
- 0xCB, 0xC8, 0xCD, 0xCE, 0xCF, 0xCC, 0xD3, 0xD4,
- 0x00, 0xD2, 0xDA, 0xDB, 0xD9
- /*, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00 */
-};
-
-/* Map of CP10000 (Mac Roman) to MSDOS CP 437 */
-static const unsigned char mac_to_cp437_map[] = {
- 0x8e, 0x8f, 0x80, 0x90, 0xa5, 0x99, 0x9a, 0xa0,
- 0x85, 0x83, 0x84, 0xe0, 0x86, 0x87, 0x82, 0x8a,
- 0x88, 0x89, 0xa1, 0x8d, 0x8c, 0x8b, 0xa4, 0xa2,
- 0x95, 0x93, 0x94, 0xe5, 0xa3, 0x97, 0x96, 0x81,
- 0xc5, 0xf8, 0x9b, 0x9c, 0xb6, 0xf9, 0xb8, 0xe1,
- 0xc9, 0xe9, 0xcb, 0xd9, 0xc0, 0xd8, 0x92, 0xe8,
- 0xec, 0xf1, 0xf3, 0xf2, 0x9d, 0xe6, 0xeb, 0xe4,
- 0xef, 0xe3, 0xf4, 0xa6, 0xa7, 0xea, 0x91, 0xed,
- 0xa8, 0xad, 0xaa, 0xfb, 0x9f, 0xf7, 0xdd, 0xae,
- 0xaf, 0xb0, 0xff, 0xd6, 0xd2, 0xb1, 0xb2, 0xb7,
- 0xb4, 0xc4, 0xb5, 0xb9, 0xba, 0xbb, 0xf6, 0xbc,
- 0x98, 0xbd, 0xf5, 0xfe, 0xbe, 0xbf, 0xc1, 0xc2,
- 0xce, 0xfa, 0xc3, 0xc6, 0xc7, 0xc8, 0xee, 0xca,
- 0xcc, 0xcd, 0xb3, 0xd7, 0xcf, 0xd0, 0xd1, 0xd3,
- 0xdb, 0xda, 0xa9, 0xab, 0xac, 0xd4, 0xd5, 0xdc,
- 0xde, 0xdf, 0xfc, 0xfd, 0xe7, 0xe2, 0xf0, 0x9e
-};
-
-/* Map of CP10000 (Mac Roman) to MSDOS CP 850 */
-static const unsigned char mac_to_cp850_map[] = {
- 0x8e, 0x8f, 0x80, 0x90, 0xa5, 0x99, 0x9a, 0xa0,
- 0x85, 0x83, 0x84, 0xc6, 0x86, 0x87, 0x82, 0x8a,
- 0x88, 0x89, 0xa1, 0x8d, 0x8c, 0x8b, 0xa4, 0xa2,
- 0x95, 0x93, 0x94, 0xe4, 0xa3, 0x97, 0x96, 0x81,
- 0xc5, 0xf8, 0xbd, 0x9c, 0xf5, 0xb0, 0xf4, 0xe1,
- 0xa9, 0xb8, 0xb1, 0xef, 0xf9, 0xca, 0x92, 0x9d,
- 0xb2, 0xf1, 0xb3, 0xb4, 0xbe, 0xe6, 0xd0, 0xba,
- 0xbb, 0xcb, 0xdd, 0xa6, 0xa7, 0xbc, 0x91, 0x9b,
- 0xa8, 0xad, 0xaa, 0xd9, 0x9f, 0xf2, 0xfe, 0xae,
- 0xaf, 0xdc, 0xff, 0xb7, 0xc7, 0xe5, 0xc0, 0xc1,
- 0xc2, 0xc4, 0xc3, 0x9e, 0xab, 0xac, 0xf6, 0xbf,
- 0x98, 0xed, 0xc8, 0xcf, 0xc9, 0xcc, 0xcd, 0xce,
- 0xd1, 0xfa, 0xd5, 0xda, 0xdb, 0xb6, 0xd2, 0xb5,
- 0xd3, 0xd4, 0xd6, 0xd7, 0xd8, 0xde, 0xe0, 0xe2,
- 0xf0, 0xe3, 0xe9, 0xea, 0xeb, 0xfb, 0xdf, 0xe7,
- 0xee, 0xe8, 0xec, 0xf3, 0xf7, 0xfc, 0xfd, 0xb9
-};
-
-
-
-/* Map of CP10000 (Mac Roman) to koi8-r */
-static const unsigned char mac_to_koi8_r_map[] = {
- 225, 226, 247, 231, 228, 229, 246, 250,
- 233, 234, 235, 236, 237, 238, 239, 240,
- 242, 243, 244, 245, 230, 232, 227, 254,
- 251, 253, 255, 249, 248, 252, 224, 241,
- 160, 161, 162, 163, 164, 165, 166, 167,
- 168, 191, 170, 171, 172, 173, 174, 175,
- 176, 177, 178, 179, 180, 181, 182, 183,
- 184, 185, 186, 187, 188, 189, 190, 191,
- 192, 193, 194, 195, 196, 197, 198, 199,
- 200, 201, 202, 203, 204, 205, 206, 207,
- 208, 209, 210, 211, 212, 213, 214, 215,
- 216, 217, 218, 219, 220, 179, 163, 209,
- 193, 194, 215, 199, 196, 197, 214, 218,
- 201, 202, 203, 204, 205, 206, 207, 208,
- 210, 211, 212, 213, 198, 200, 195, 222,
- 219, 221, 223, 217, 216, 220, 192, 255
-};
-
-struct mac_code {
- char *m_name;
- const unsigned char *m_map;
- u_int16_t m_len;
- const char *m_id;
-};
-
-static struct mac_code names[] = {
- {"maccode.437", mac_to_cp437_map, sizeof(mac_to_cp437_map), "cp437"},
- {"maccode.850", mac_to_cp850_map, sizeof(mac_to_cp850_map), "cp850"},
- {"maccode.iso8859-1", mac_to_isolatin1_map, sizeof(mac_to_isolatin1_map), "iso8859-1"},
- {"maccode.iso8859-1.adapted", mac_to_isolatin1_adapted_map, sizeof(mac_to_isolatin1_adapted_map), "iso8859-1-adapted"},
- {"maccode.koi8-r",mac_to_koi8_r_map,sizeof(mac_to_koi8_r_map),"koi8-r"},
- {NULL, NULL, 0, NULL}
- };
-
-int main(int argc, char **argv)
-{
- unsigned char buf[CODEPAGE_FILE_HEADER_SIZE];
- u_int16_t id;
- int i, j;
- FILE *fp;
-
- if (argc != 2) {
- fprintf(stderr, "Usage: %s MACCODE\n", argv[0]);
- return 1;
- }
-
- for (i = 0; names[i].m_name; i++) {
- if (!strcmp(names[i].m_name, argv[1]))
- break;
- }
-
- if (!names[i].m_name) {
- fprintf(stderr, "unknown codepage\n");
- return 1;
- }
-
-
- if ((fp = fopen(names[i].m_name, "w")) == NULL) {
- fprintf(stderr, "can't open %s: %s\n",
- names[i].m_name, strerror(errno));
- return 1;
- }
-
- memset(buf, 0, CODEPAGE_FILE_HEADER_SIZE);
-
- id = htons(CODEPAGE_FILE_ID); /* file id */
- memcpy(buf, &id, sizeof(id));
- *(buf + 2) = CODEPAGE_FILE_VERSION; /* version */
- if ((j = strlen(names[i].m_id)) & 1) /* pad to even boundary */
- j++;
- *(buf + 3) = j; /* length of name */
-
- *(buf + 4) = 1; /* default quantum. this should be modified to
- * deal with multibyte characters */
-
- /* rules */
- *(buf + 5) = CODEPAGE_RULE_MTOU | CODEPAGE_RULE_UTOM;
-
- /* offset to data */
- id = htons(CODEPAGE_FILE_HEADER_SIZE + j);
- memcpy(buf + 6, &id, sizeof(id));
-
- /* size of data */
- id = htons(names[i].m_len);
- memcpy(buf + 8, &id, sizeof(id));
-
- /* write it out */
- fwrite(buf, CODEPAGE_FILE_HEADER_SIZE, 1, fp);
-
- /* we either keep or drop the null byte to keep the name on an
- * even boundary */
- fwrite(names[i].m_id, j, 1, fp);
-
- /* we typically only map characters > 0x7F */
- for (j = 0; j < names[i].m_len; j++) {
- buf[0] = CODEPAGE_RULE_MTOU | CODEPAGE_RULE_UTOM;
- buf[1] = j + 0x80;
- buf[2] = names[i].m_map[j];
- fwrite(buf, 3, 1, fp);
- }
- fclose(fp);
-
- return 0;
-}
/*
- * $Id: volume.c,v 1.51.2.7.2.1 2003-09-09 16:42:20 didg Exp $
+ * $Id: volume.c,v 1.51.2.7.2.2 2003-09-13 02:46:28 bfernhomberg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
#define VOLOPT_DENY 1 /* user deny list */
#define VOLOPT_RWLIST 2 /* user rw list */
#define VOLOPT_ROLIST 3 /* user ro list */
-#define VOLOPT_CODEPAGE 4 /* codepage */
-#define VOLOPT_PASSWORD 5 /* volume password */
-#define VOLOPT_CASEFOLD 6 /* character case mangling */
-#define VOLOPT_FLAGS 7 /* various flags */
-#define VOLOPT_DBPATH 8 /* path to database */
-#define VOLOPT_MAPCHARS 9 /* does mtou and utom mappings. syntax:
+#define VOLOPT_PASSWORD 4 /* volume password */
+#define VOLOPT_CASEFOLD 5 /* character case mangling */
+#define VOLOPT_FLAGS 6 /* various flags */
+#define VOLOPT_DBPATH 7 /* path to database */
+#define VOLOPT_MAPCHARS 8 /* does mtou and utom mappings. syntax:
m and u can be double-byte hex
strings if necessary.
m=u -> map both ways
return 1;
}
-static __inline__ char *get_codepage_path(const char *path, const char *name)
-{
- char *page;
- int len;
-
- if (path) {
- page = (char *) malloc((len = strlen(path)) + strlen(name) + 2);
- if (page) {
- strcpy(page, path);
- if (path[len - 1] != '/') /* add a / */
- strcat(page, "/");
- strcat(page, name);
- }
- } else {
- page = strdup(name);
- }
-
- /* debug: show which codepage directory we are using */
- LOG(log_debug, logtype_afpd, "using codepage directory: %s", page);
-
- return page;
-}
/* -------------------- */
static void setoption(struct vol_option *options, struct vol_option *save, int opt, const char *val)
handle all the options. tmp can't be NULL. */
static void volset(struct vol_option *options, struct vol_option *save,
char *volname, int vlen,
- const char *nlspath, const char *tmp)
+ const char *tmp)
{
char *val;
setoption(options, save, VOLOPT_ROLIST, val);
} else if (optionok(tmp, "codepage:", val)) {
- if (options[VOLOPT_CODEPAGE].c_value &&
- (!save || options[VOLOPT_CODEPAGE].c_value != save[VOLOPT_CODEPAGE].c_value)) {
- free(options[VOLOPT_CODEPAGE].c_value);
- }
- options[VOLOPT_CODEPAGE].c_value = get_codepage_path(nlspath, val + 1);
+ LOG (log_error, logtype_afpd, "The old codepage system has been removed. Please make sure to read the documentation !!!!");
+ /* Make sure we don't screw anything */
+ exit (-1);
} else if (optionok(tmp, "volcharset:", val)) {
setoption(options, save, VOLOPT_ENCODING, val);
} else if (optionok(tmp, "maccharset:", val)) {
options[VOLOPT_FLAGS].i_value |= AFPVOL_A2VOL;
else if (strcasecmp(p, "mswindows") == 0) {
options[VOLOPT_FLAGS].i_value |= AFPVOL_MSWINDOWS;
- if (!options[VOLOPT_CODEPAGE].c_value)
- options[VOLOPT_CODEPAGE].c_value =
- get_codepage_path(nlspath, MSWINDOWS_CODEPAGE);
-
} else if (strcasecmp(p, "crlf") == 0)
options[VOLOPT_FLAGS].i_value |= AFPVOL_CRLF;
else if (strcasecmp(p, "noadouble") == 0)
/* shift in some flags */
volume->v_flags = options[VOLOPT_FLAGS].i_value;
- /* read in the code pages */
- if (options[VOLOPT_CODEPAGE].c_value)
- codepage_read(volume, options[VOLOPT_CODEPAGE].c_value);
-
if (options[VOLOPT_PASSWORD].c_value)
volume->v_password = strdup(options[VOLOPT_PASSWORD].c_value);
path + VOLOPT_DEFAULT_LEN) < 0)
break;
volset(save_options, NULL, tmp, sizeof(tmp) - 1,
- obj->options.nlspath, path + VOLOPT_DEFAULT_LEN);
+ path + VOLOPT_DEFAULT_LEN);
}
}
break;
if (parseline( sizeof( tmp ) - 1, tmp ) < 0)
break;
- volset(options, save_options, volname, sizeof(volname) - 1,obj->options.nlspath, tmp);
+ volset(options, save_options, volname, sizeof(volname) - 1, tmp);
}
/* check allow/deny lists:
free(vol->v_name);
vol->v_name = NULL;
free(vol->v_path);
- codepage_free(vol);
free(vol->v_password);
free(vol->v_veto);
free(vol->v_volcodepage);