yuripv commented on this pull request.


> @@ -198,6 +198,7 @@ SYMBOL_VERSION SUNW_1.1 {
        nvlist_alloc;
        nvlist_dup;
        nvlist_free;
+       nvlist_invalidate;

You can't add the symbols to already existing public version, either move it to 
SUNWprivate_1.1, or provide new public version.

>               return (-1);
 
-       for (l = 0; l < VDEV_LABELS; l++) {
-               if (pwrite64(fd, label, sizeof (vdev_label_t),
-                   label_offset(size, l)) != sizeof (vdev_label_t)) {
-                       free(label);
-                       return (-1);
+       for (l = start; l < end; l++) {
+               if ((check == B_TRUE) || (cherry == B_TRUE)) {

treat these as booleans that they are, i.e., ```if (check || cherry)```.

>               switch (c) {
+               case 'b':
+                       start = 0;
+                       n = VDEV_LABELS / 2;
+                       break;
+               case 'e':
+                       start = VDEV_LABELS / 2;
+                       n = VDEV_LABELS / 2;
+                       break;
+               case 'i':
+                       index = strtoll(optarg, &end, 10);

how about using our new friend, ```strtonum()``, here? :-)

> @@ -105,6 +105,9 @@
 .Op Ar interval Op Ar count
 .Nm
 .Cm labelclear
+.Op Fl b | Fl e | Fl i Ar index

can we please make it (here, usage, description) ```zfs labelclear [-cfm] 
[-b|-e|-i index] device```?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/424#pullrequestreview-49740365
------------------------------------------
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T92ce69bb6bd4a9c6-Mb1f31cd3e6b5baa1ce303894
Powered by Topicbox: https://topicbox.com

Reply via email to