Print this page
*** NO COMMENTS ***

@@ -250,11 +250,11 @@
                     "\trename [-f] -p <filesystem|volume> <filesystem|volume>\n"
                     "\trename -r <snapshot> <snapshot>"));
         case HELP_ROLLBACK:
                 return (gettext("\trollback [-rRf] <snapshot>\n"));
         case HELP_SEND:
-                return (gettext("\tsend [-DnPpRrv] [-[iI] snapshot] "
+                return (gettext("\tsend [-DnPpRrvs] [-[iI] snapshot] "
                     "<snapshot>\n"));
         case HELP_SET:
                 return (gettext("\tset <property=value> "
                     "<filesystem|volume|snapshot> ...\n"));
         case HELP_SHARE:

@@ -3550,11 +3550,11 @@
         int c, err;
         nvlist_t *dbgnv = NULL;
         boolean_t extraverbose = B_FALSE;
 
         /* check options */
-        while ((c = getopt(argc, argv, ":i:I:RDpvnP")) != -1) {
+        while ((c = getopt(argc, argv, ":i:I:RDpvnPs")) != -1) {
                 switch (c) {
                 case 'i':
                         if (fromname)
                                 usage(B_FALSE);
                         fromname = optarg;

@@ -3585,10 +3585,13 @@
                         flags.dedup = B_TRUE;
                         break;
                 case 'n':
                         flags.dryrun = B_TRUE;
                         break;
+                case 's':
+                        flags.sendsize = B_TRUE;
+                        break;
                 case ':':
                         (void) fprintf(stderr, gettext("missing argument for "
                             "'%c' option\n"), optopt);
                         usage(B_FALSE);
                         break;

@@ -3610,11 +3613,14 @@
         if (argc > 1) {
                 (void) fprintf(stderr, gettext("too many arguments\n"));
                 usage(B_FALSE);
         }
 
-        if (!flags.dryrun && isatty(STDOUT_FILENO)) {
+        if (flags.sendsize) {
+                (void) close(STDOUT_FILENO);
+                (void) open("/dev/null", O_WRONLY|O_LARGEFILE);
+        } else if (!flags.dryrun && isatty(STDOUT_FILENO)) {
                 (void) fprintf(stderr,
                     gettext("Error: Stream can not be written to a terminal.\n"
                     "You must redirect standard output.\n"));
                 return (1);
         }