{
int stat;
char ** args = AskFSInfo(info, TRUE);
-
- if ( (stat = sms_query("update_filesys", CountArgs(args),
- args, NullFunc, NULL)) != 0)
- com_err(program_name, stat, ", filesystem not updated");
- else
- Put_message("filesystem sucessfully updated.");
+ extern Menu nfsphys_menu;
+
+ stat = sms_query("update_filesys", CountArgs(args), args, NullFunc, NULL);
+ switch (stat) {
+ case SMS_NFS:
+ Put_message("That NFS filesystem is not exported.");
+ if (YesNoQuestion("Fix this now (Y/N)")) {
+ Do_menu(&nfsphys_menu, 0, NULL);
+ if (YesNoQuestion("Retry filesystem update now (Y/N)")) {
+ if (stat = sms_query("update_filesys", CountArgs(args), args,
+ NullFunc, NULL))
+ com_err(program_name, stat, " filesystem not updated");
+ else
+ Put_message("filesystem sucessfully updated.");
+ }
+ }
+ break;
+ default:
+ com_err(program_name, stat, " in AddFS");
+ }
}
/* Function Name: ChangeFS
{
char *info[MAX_ARGS_SIZE], **args;
int stat;
+ extern Menu nfsphys_menu;
if ( !ValidName(argv[1]) )
return(DM_NORMAL);
args = AskFSInfo(SetDefaults(info, argv[1]), FALSE );
- if ( (stat = sms_query("add_filesys", CountArgs(args), args,
- NullFunc, NULL)) != 0)
+ stat = sms_query("add_filesys", CountArgs(args), args, NullFunc, NULL);
+ switch (stat) {
+ case SMS_NFS:
+ Put_message("That NFS filesystem is not exported.");
+ if (YesNoQuestion("Fix this now (Y/N)")) {
+ Do_menu(&nfsphys_menu, 0, NULL);
+ if (YesNoQuestion("Retry filesystem creation now (Y/N)")) {
+ if (stat = sms_query("add_filesys", CountArgs(args), args,
+ NullFunc, NULL))
+ com_err(program_name, stat, " in AddFS");
+ else
+ Put_message("Created.");
+ }
+ }
+ break;
+ default:
com_err(program_name, stat, " in AddFS");
+ }
FreeInfo(info);
return (DM_NORMAL);