]> arthur.barton.de Git - netatalk.git/blobdiff - bin/ad/ad_find.c
Convert ad file suite and CNID daemons to use new config code
[netatalk.git] / bin / ad / ad_find.c
index 8501500c7c7ff9acb229a3a005a0279db55442d3..20c67afb8cfec80955174318e220973380468f8e 100644 (file)
@@ -28,7 +28,6 @@
 #include <atalk/adouble.h>
 #include <atalk/cnid.h>
 #include <atalk/cnid_dbd_private.h>
-#include <atalk/volinfo.h>
 #include <atalk/bstrlib.h>
 #include <atalk/bstradd.h>
 #include <atalk/directory.h>
@@ -117,9 +116,9 @@ int ad_find(int argc, char **argv)
 
     uint16_t flags = CONV_TOLOWER;
     char namebuf[MAXPATHLEN + 1];
-    if (convert_charset(vol.volinfo.v_volcharset,
-                        vol.volinfo.v_volcharset,
-                        vol.volinfo.v_maccharset,
+    if (convert_charset(vol.vol->v_volcharset,
+                        vol.vol->v_volcharset,
+                        vol.vol->v_maccharset,
                         argv[optind],
                         strlen(argv[optind]),
                         namebuf,
@@ -130,7 +129,7 @@ int ad_find(int argc, char **argv)
 
     int count;
     char resbuf[DBD_MAX_SRCH_RSLTS * sizeof(cnid_t)];
-    if ((count = cnid_find(vol.volume.v_cdb,
+    if ((count = cnid_find(vol.vol->v_cdb,
                            namebuf,
                            strlen(namebuf),
                            resbuf,
@@ -146,7 +145,7 @@ int ad_find(int argc, char **argv)
             bufp += sizeof(cnid_t);
 
             bstring path = NULL;
-            bstring volpath = bfromcstr(vol.volinfo.v_path);
+            bstring volpath = bfromcstr(vol.vol->v_path);
             BSTRING_STRIP_SLASH(volpath);
             char buffer[12 + MAXPATHLEN + 1];
             int buflen = 12 + MAXPATHLEN + 1;
@@ -155,7 +154,7 @@ int ad_find(int argc, char **argv)
             struct bstrList *pathlist = bstrListCreateMin(32);
 
             while (did != DIRDID_ROOT) {
-                if ((name = cnid_resolve(vol.volume.v_cdb, &did, buffer, buflen)) == NULL)
+                if ((name = cnid_resolve(vol.vol->v_cdb, &did, buffer, buflen)) == NULL)
                     goto next;
                 bstrListPush(pathlist, bfromcstr(name));
             }