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
3 changed files with 5 additions and 5 deletions

View File

@ -48,13 +48,13 @@ the beginning of the file.
.BR w [ <del> ] .BR w [ <del> ]
Open a file below Open a file below
.I /proc/## .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 can be one of the follwoing
.BR '\ ' ,\ ',' ,\ '.' ,\ and\ ':' .BR '\ ' ,\ ',' ,\ '.' ,\ and\ ':'
where the default is the colon where the default is the colon
.BR ',' . .BR ',' .
This allows to split very large input lines into pieces at this 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/## . .IR /proc/## .
.TP .TP
.B e .B e

View File

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

View File

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