[developer] Re: [openzfs/openzfs] zfs holds: In scripted mode, do not pad columns with spaces (#488)

2018-01-18 Thread Prakash Surya
Closed #488 via 3aace5c077ce989ffe84c1c0f2f6e3bf96803e6c.

-- 
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/488#event-1431383364
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/Tb89fa1a435032eb4-Mdd1c1e3e69fc9e1a4d055353
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] zfs holds: In scripted mode, do not pad columns with spaces (#488)

2018-01-10 Thread Allan Jude
Ha. My first rebase, only took like 6 tries.

-- 
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/488#issuecomment-356841770
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/Tb89fa1a435032eb4-Me118e8be7b915293cc30c7eb
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] zfs holds: In scripted mode, do not pad columns with spaces (#488)

2018-01-10 Thread Allan Jude
That does not seem to have gone well at all...

-- 
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/488#issuecomment-356839345
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/Tb89fa1a435032eb4-Mbc0a304a71f48df0ffe9d8f0
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] zfs holds: In scripted mode, do not pad columns with spaces (#488)

2018-01-09 Thread Prakash Surya
@allanjude Can you rebase onto the latest master branch, and squash to a single 
commit? I can open the RTI after that's done.

-- 
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/488#issuecomment-356427028
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/Tb89fa1a435032eb4-Mc3b96d50366a2fc94a4b0eb2
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] zfs holds: In scripted mode, do not pad columns with spaces (#488)

2017-11-02 Thread Matthew Ahrens
ahrens approved this pull request.





-- 
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/488#pullrequestreview-73847786
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/Tb89fa1a435032eb4-Mfbd681ca8abec454c30e437d
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] zfs holds: In scripted mode, do not pad columns with spaces (#488)

2017-11-01 Thread Matthew Ahrens
ahrens commented on this pull request.



> @@ -5596,17 +5596,23 @@ print_holds(boolean_t scripted, size_t nwidth, size_t 
> tagwidth, nvlist_t *nvl)
uint64_t val = 0;
time_t time;
struct tm t;
-   char sep = scripted ? '\t' : ' ';
-   size_t sepnum = scripted ? 1 : 2;
+   char sep = ' ';
+   size_t sepnum = 2;

It doesn't look like these are needed; you can instead use the simpler printf 
format of `"%-*s  %-*s  %s"`

-- 
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/488#pullrequestreview-73649538
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/Tb89fa1a435032eb4-M7eaa007652ef0a53342c500f
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] zfs holds: In scripted mode, do not pad columns with spaces (#488)

2017-11-01 Thread Prakash Surya
@allanjude is your branch based off of illumos or openzfs? if it's illumos, can 
you rebase onto the master branch of openzfs? I think that's what's causing the 
tests to fail.

-- 
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/488#issuecomment-341162748
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/Tb89fa1a435032eb4-M6cb93181f14f6219b9bea5d5
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] zfs holds: In scripted mode, do not pad columns with spaces (#488)

2017-11-01 Thread Matthew Ahrens
ahrens commented on this pull request.



> @@ -5395,8 +5395,13 @@ print_holds(boolean_t scripted, size_t nwidth, size_t 
> tagwidth, nvlist_t *nvl)
(void) strftime(tsbuf, DATETIME_BUF_LEN,
gettext(STRFTIME_FMT_STR), );
 
-   (void) printf("%-*s%*c%-*s%*c%s\n", nwidth, zname,
-   sepnum, sep, tagwidth, tagname, sepnum, sep, tsbuf);
+   if (scripted)
+   (void) printf("%s%c%s%c%s\n", zname,
+   sep, tagname, sep, tsbuf);
+   else
+   (void) printf("%-*s%*c%-*s%*c%s\n", nwidth,
+   zname, sepnum, sep, tagwidth, tagname,
+   sepnum, sep, tsbuf);

The printf's would be simpler if we used ` ` / `\t` in the format string, 
rather than using the variable `sep`.

For readability, cstyle recommends {braces} around multi-line if/else bodies 
(even if only one statement).

-- 
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/488#pullrequestreview-73526581
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/Tb89fa1a435032eb4-Ma5a2d3fbe4b5caab414a73bd
Powered by Topicbox: https://topicbox.com