-
Notifications
You must be signed in to change notification settings - Fork 9
Added the option to set fsname manually #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,9 @@ | ||
| ltsm (0.9.3) unstable; urgency=low | ||
|
|
||
| * Added option to set fsname manually | ||
|
|
||
| -- Samuel Hasert <[email protected]> Tue, 06 Jan 2026 10:26:20 +0200 | ||
|
|
||
| ltsm (0.9.2) unstable; urgency=low | ||
|
|
||
| * Increased buffersize to 16 MiB | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,6 +64,9 @@ rm -rf %{buildroot} | |
|
|
||
| %changelog | ||
|
|
||
| * Tue Jan 06 2026 Samuel Hasert <[email protected]> 0.9.3 | ||
| - Added option to set fsname manually | ||
|
|
||
| * Mon Sep 15 2025 Samuel Hasert <[email protected]> 0.9.2 | ||
| - Increased buffersize to 16 MiB | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -131,6 +131,8 @@ static void usage(const char *cmd_name, const int rc) | |
| "\t\t""hostname of tsm server\n" | ||
| "\t-c, --conf <file>\n" | ||
| "\t\t""option conf file\n" | ||
| "\t-f, --fsname\n" | ||
| "\t\t""set fsname manually\n" | ||
| "\t-v, --verbose {error, warn, message, info, debug}" | ||
| " [default: %s]\n" | ||
| "\t\t""produce more verbose output\n" | ||
|
|
@@ -297,6 +299,7 @@ static int ct_parseopts(int argc, char *argv[]) | |
| {.name = "owner", .has_arg = required_argument, .flag = NULL, .val = 'o'}, | ||
| {.name = "servername", .has_arg = required_argument, .flag = NULL, .val = 's'}, | ||
| {.name = "conf", .has_arg = required_argument, .flag = NULL, .val = 'c'}, | ||
| {.name = "fsname", .has_arg = no_argument, .flag = NULL, .val = 'f'}, | ||
|
||
| {.name = "verbose", .has_arg = required_argument, .flag = NULL, .val = 'v'}, | ||
| {.name = "dry-run", .has_arg = no_argument, .flag = &opt.o_dry_run, .val = 1}, | ||
| {.name = "restore-stripe", .has_arg = no_argument, .flag = &opt.o_restore_stripe, .val = 1}, | ||
|
|
@@ -308,7 +311,7 @@ static int ct_parseopts(int argc, char *argv[]) | |
| int c, rc; | ||
| optind = 0; | ||
|
|
||
| while ((c = getopt_long(argc, argv, "a:t:n:p:o:s:c:v:h", | ||
| while ((c = getopt_long(argc, argv, "a:t:n:p:o:s:c:f:v:h", | ||
| long_opts, NULL)) != -1) { | ||
| switch (c) { | ||
| case 'a': { | ||
|
|
@@ -345,6 +348,11 @@ static int ct_parseopts(int argc, char *argv[]) | |
| read_conf(optarg); | ||
| break; | ||
| } | ||
| case 'f': { | ||
| strncpy(opt.o_fsname, optarg, | ||
| DSM_MAX_FSNAME_LENGTH); | ||
| break; | ||
| } | ||
| case 'v': { | ||
| if (OPTNCMP("error", optarg)) | ||
| opt.o_verbose = API_MSG_ERROR; | ||
|
|
@@ -388,7 +396,9 @@ static int ct_parseopts(int argc, char *argv[]) | |
| opt.o_mnt_fd = -1; | ||
|
|
||
| /* Filespace name is set to Lustre mount point. */ | ||
| strncpy(opt.o_fsname, opt.o_mnt, DSM_MAX_FSNAME_LENGTH); | ||
| if (!opt.o_fsname[0]) | ||
| strncpy(opt.o_fsname, opt.o_mnt, DSM_MAX_FSNAME_LENGTH); | ||
|
||
|
|
||
| const size_t len_fsname = strlen(opt.o_fsname); | ||
| if (len_fsname > 2 && opt.o_fsname[len_fsname - 1] == '/') | ||
| opt.o_fsname[len_fsname - 1] = '\0'; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.