1252 switch (err) {
1253 case BE_SUCCESS:
1254 (void) printf(_("Mounted successfully on: '%s'\n"), mountpoint);
1255 break;
1256 case BE_ERR_BE_NOENT:
1257 (void) fprintf(stderr, _("%s does not exist or appear "
1258 "to be a valid BE.\nPlease check that the name of "
1259 "the BE provided is correct.\n"), obe_name);
1260 break;
1261 case BE_ERR_MOUNTED:
1262 (void) fprintf(stderr, _("%s is already mounted.\n"
1263 "Please unmount the BE before mounting it again.\n"),
1264 obe_name);
1265 break;
1266 case BE_ERR_PERM:
1267 case BE_ERR_ACCESS:
1268 (void) fprintf(stderr, _("Unable to mount %s.\n"), obe_name);
1269 (void) fprintf(stderr, _("You have insufficient privileges to "
1270 "execute this command.\n"));
1271 break;
1272 default:
1273 (void) fprintf(stderr, _("Unable to mount %s.\n"), obe_name);
1274 (void) fprintf(stderr, "%s\n", be_err_to_str(err));
1275 }
1276
1277 out:
1278 if (tmp_mp != NULL)
1279 free(tmp_mp);
1280 nvlist_free(be_attrs);
1281 return (err);
1282 }
1283
1284 static int
1285 be_do_unmount(int argc, char **argv)
1286 {
1287 nvlist_t *be_attrs;
1288 char *obe_name;
1289 int err = 1;
1290 int c;
1291 int unmount_flags = 0;
|
1252 switch (err) {
1253 case BE_SUCCESS:
1254 (void) printf(_("Mounted successfully on: '%s'\n"), mountpoint);
1255 break;
1256 case BE_ERR_BE_NOENT:
1257 (void) fprintf(stderr, _("%s does not exist or appear "
1258 "to be a valid BE.\nPlease check that the name of "
1259 "the BE provided is correct.\n"), obe_name);
1260 break;
1261 case BE_ERR_MOUNTED:
1262 (void) fprintf(stderr, _("%s is already mounted.\n"
1263 "Please unmount the BE before mounting it again.\n"),
1264 obe_name);
1265 break;
1266 case BE_ERR_PERM:
1267 case BE_ERR_ACCESS:
1268 (void) fprintf(stderr, _("Unable to mount %s.\n"), obe_name);
1269 (void) fprintf(stderr, _("You have insufficient privileges to "
1270 "execute this command.\n"));
1271 break;
1272 case BE_ERR_NO_MOUNTED_ZONE:
1273 (void) fprintf(stderr, _("Mounted on '%s'.\nUnable to mount "
1274 "one of %s's zone BE's.\n"), mountpoint, obe_name);
1275 break;
1276 default:
1277 (void) fprintf(stderr, _("Unable to mount %s.\n"), obe_name);
1278 (void) fprintf(stderr, "%s\n", be_err_to_str(err));
1279 }
1280
1281 out:
1282 if (tmp_mp != NULL)
1283 free(tmp_mp);
1284 nvlist_free(be_attrs);
1285 return (err);
1286 }
1287
1288 static int
1289 be_do_unmount(int argc, char **argv)
1290 {
1291 nvlist_t *be_attrs;
1292 char *obe_name;
1293 int err = 1;
1294 int c;
1295 int unmount_flags = 0;
|