Lines Matching refs:volinfo
16 .volinfo file handling, command line utilities
42 #include <atalk/volinfo.h>
198 int vol_load_charsets( struct volinfo *vol)
240 static int parseline ( char *buf, struct volinfo *vol)
344 int loadvolinfo (char *path, struct volinfo *vol)
356 memset(vol, 0, sizeof(struct volinfo));
359 /* volinfo file is in .AppleDesktop */
379 fprintf (stderr, "error opening volinfo (%s): %s", volinfofile, strerror(errno));
423 * Allocate a struct volinfo object for refcounting usage with retain and close, and
426 struct volinfo *allocvolinfo(char *path)
428 struct volinfo *p = malloc(sizeof(struct volinfo));
440 void retainvolinfo(struct volinfo *vol)
448 int closevolinfo(struct volinfo *volinfo)
450 if (volinfo->retaincount <= 0)
453 volinfo->retaincount--;
455 if (volinfo->retaincount == 0) {
456 free(volinfo->v_name); volinfo->v_name = NULL;
457 free(volinfo->v_path); volinfo->v_path = NULL;
458 free(volinfo->v_cnidscheme); volinfo->v_cnidscheme = NULL;
459 free(volinfo->v_dbpath); volinfo->v_dbpath = NULL;
460 free(volinfo->v_volcodepage); volinfo->v_volcodepage = NULL;
461 free(volinfo->v_maccodepage); volinfo->v_maccodepage = NULL;
462 free(volinfo->v_dbd_host); volinfo->v_dbd_host = NULL;
463 free(volinfo->v_dbd_port); volinfo->v_dbd_port = NULL;
464 if (volinfo->malloced) {
465 volinfo->malloced = 0;
466 free(volinfo);
615 LOG(log_debug, logtype_default, "Error writing .volinfo file: buffer too small, %s", buf);
617 LOG(log_debug, logtype_default, "Error writing .volinfo file: %s", strerror(errno));