diff options
author | Josh Durgin <josh.durgin@dreamhost.com> | 2011-09-21 10:47:47 -0700 |
---|---|---|
committer | Josh Durgin <josh.durgin@dreamhost.com> | 2011-09-26 18:10:39 -0700 |
commit | bc16878cc5de5ef82e2f65a2f34485a87dfee8db (patch) | |
tree | a2a6c3ffcb9fcad06ceab4cd5439bbe00f2d422d /src/mount | |
parent | 5f9be6fb1501622718731b90958f3b986c1050db (diff) | |
download | ceph-bc16878cc5de5ef82e2f65a2f34485a87dfee8db.tar.gz |
Use cpp_strerror or strerror_r when appropriate.
The only remaining uses of strerror are in single-threaded programs
that don't depend on libcommon.
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Diffstat (limited to 'src/mount')
-rwxr-xr-x | src/mount/mount.ceph.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mount/mount.ceph.c b/src/mount/mount.ceph.c index 37017f16c67..e7a247dfaef 100755 --- a/src/mount/mount.ceph.c +++ b/src/mount/mount.ceph.c @@ -298,7 +298,9 @@ static void modprobe(void) { int status; status = system("/sbin/modprobe ceph"); if (status < 0) { - fprintf(stderr, "mount.ceph: cannot run modprobe: %s\n", strerror(errno)); + char error_buf[80]; + fprintf(stderr, "mount.ceph: cannot run modprobe: %s\n", + strerror_r(errno, error_buf, sizeof(error_buf))); } else if (WIFEXITED(status)) { status = WEXITSTATUS(status); if (status != 0) { |