Lines Matching defs:cmd
28 static int pvcreate_restore_params_validate(struct cmd_context *cmd,
36 if (arg_count(cmd, restorefile_ARG) && !arg_count(cmd, uuidstr_ARG)) {
41 if (arg_count(cmd, uuidstr_ARG) && argc != 1) {
46 if (arg_count(cmd, uuidstr_ARG)) {
47 uuid = arg_str_value(cmd, uuidstr_ARG, "");
53 if (arg_count(cmd, restorefile_ARG)) {
54 pp->restorefile = arg_str_value(cmd, restorefile_ARG, "");
56 if (!(vg = backup_read_vg(cmd, NULL, pp->restorefile))) {
72 if (arg_sign_value(cmd, physicalvolumesize_ARG, 0) == SIGN_MINUS) {
76 pp->size = arg_uint64_value(cmd, physicalvolumesize_ARG, UINT64_C(0));
78 if (arg_count(cmd, restorefile_ARG) || arg_count(cmd, uuidstr_ARG))
83 int pvcreate(struct cmd_context *cmd, int argc, char **argv)
91 if (!pvcreate_restore_params_validate(cmd, argc, argv, &pp)) {
94 if (!pvcreate_params_validate(cmd, argc, argv, &pp)) {
99 if (!lock_vol(cmd, VG_ORPHANS, LCK_VG_WRITE)) {
104 if (!pvcreate_single(cmd, argv[i], &pp)) {
109 unlock_vg(cmd, VG_ORPHANS);