#undef _GNU_SOURCE #include #include #include /* * The tools so far have been using the strerror_r() GNU variant, that returns * a string, be it the buffer passed or something else. * * But that, besides being tricky in cases where we expect that the function * using strerror_r() returns the error formatted in a provided buffer (we have * to check if it returned something else and copy that instead), breaks the * build on systems not using glibc, like Alpine Linux, where musl libc is * used. * * So, introduce yet another wrapper, str_error_r(), that has the GNU * interface, but uses the portable XSI variant of strerror_r(), so that users * rest asured that the provided buffer is used and it is what is returned. */ char *str_error_r(int errnum, char *buf, size_t buflen) { int err = strerror_r(errnum, buf, buflen); if (err) snprintf(buf, buflen, "INTERNAL ERROR: strerror_r(%d, %p, %zd)=%d", errnum, buf, buflen, err); return buf; } 'this.form.submit();'> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
'/>
AgeCommit message (Expand)AuthorFilesLines
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-02-03 16:18:51 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-03 16:18:51 -0800
commita0a28644c1cf191e514dd64bf438e69c178b8440 (patch)
tree4a5140d2f13692f91ca012d0eab146e9f366ce95 /drivers/usb/phy/phy-mxs-usb.c
parenta49e6f584e29785f9e5eb8dd31435746818dd5c4 (diff)
parent6f3e71c0c3f2479e05682e2e563b75decab36591 (diff)
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fix from James Bottomley: "A single fix this time: a fix for a virtqueue removal bug which only appears to affect S390, but which results in the queue hanging forever thus causing the machine to fail shutdown" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: virtio_scsi: Reject commands when virtqueue is broken
Diffstat (limited to 'drivers/usb/phy/phy-mxs-usb.c')