]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-dokan: Exposed --win-vol-serial CLI option for ceph-dokan 48735/head
authorStefan Chivu <schivu@cloudbasesolutions.com>
Wed, 2 Nov 2022 12:32:40 +0000 (14:32 +0200)
committerStefan Chivu <schivu@cloudbasesolutions.com>
Mon, 7 Nov 2022 08:26:27 +0000 (10:26 +0200)
Signed-off-by: Stefan Chivu <schivu@cloudbasesolutions.com>
src/dokan/options.cc

index 8fb4a7dff3eabac88a6af53981d116a862610f13..910f3a45c77dd28d2ed98d0705c31157c968caf8 100644 (file)
@@ -39,6 +39,7 @@ Map options:
   --current-session-only      expose the mount only to the current user session
   --removable                 use a removable drive
   --win-vol-name arg          The Windows volume name. Default: Ceph - <fs_name>.
+  --win-vol-serial arg        The Windows volume serial number. Default: <fs_id>.
 
 Unmap options:
   -l [ --mountpoint ] arg     mountpoint (path or drive letter) (e.g -l x).
@@ -83,6 +84,7 @@ int parse_args(
   std::ostringstream err;
   std::string mountpoint;
   std::string win_vol_name;
+  std::string win_vol_serial;
 
   int thread_count;
 
@@ -110,6 +112,9 @@ int parse_args(
     } else if (ceph_argparse_witharg(args, i, &win_vol_name,
                                      "--win-vol-name", (char *)NULL)) {
       cfg->win_vol_name = to_wstring(win_vol_name);
+    } else if (ceph_argparse_witharg(args, i, &win_vol_serial,
+                                     "--win-vol-serial", (char *)NULL)) {
+      cfg->win_vol_serial = std::stoul(win_vol_serial);
     } else if (ceph_argparse_flag(args, i, "--current-session-only", (char *)NULL)) {
       cfg->current_session_only = true;
     } else if (ceph_argparse_witharg(args, i, &thread_count,