Merge branch 'pks-t/procps-pks/sysctl-handle-close-errors'

References:
 procps-ng/procps!65
This commit is contained in:
Craig Small 2019-03-04 21:46:18 +11:00
commit 6e8d124a3b
3 changed files with 5 additions and 5 deletions

View File

@ -48,13 +48,13 @@ the beginning of the file.
.BR w [ <del> ]
Open a file below
.I /proc/##
for writing even large buffers. The optional delimeter character
for writing even large buffers. The optional delimiter character
can be one of the follwoing
.BR '\ ' ,\ ',' ,\ '.' ,\ and\ ':'
where the default is the colon
.BR ',' .
This allows to split very large input lines into pieces at this
delimeter and write each of them to the opened file below
delimiter and write each of them to the opened file below
.IR /proc/## .
.TP
.B e

View File

@ -249,9 +249,9 @@ ssize_t proc_write(void *c, const char *buf, size_t count)
do {
token = NULL;
if (cookie->offset > LINELEN)
token = (char*)memrchr(cookie->buf+offset, ',', LINELEN);
token = (char*)memrchr(cookie->buf+offset, cookie->delim, LINELEN);
else
token = (char*)memrchr(cookie->buf+offset, '\n', LINELEN);
token = (char*)memrchr(cookie->buf+offset, '\n', cookie->offset);
if (token)
*token = '\n';
else {

View File

@ -465,7 +465,7 @@ static int WriteSetting(const char *setting)
rc = 0;
if (close_stream(fp) != 0)
xwarn(_("setting key \"%s\""), outname);
if (rc == 0 && !Quiet) {
else if (rc == 0 && !Quiet) {
if (NameOnly) {
fprintf(stdout, "%s\n", outname);
} else {