From 36503d1b0bf40ed8ee0ffeb769b76a7d8ac2ce0a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sat, 19 May 2012 14:09:48 -0700 Subject: [PATCH] filestore: mkfs: rename buf -> fsid_fn Signed-off-by: Sage Weil --- src/os/FileStore.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 3219ae532e998..5007c06b4fd9b 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -854,8 +854,8 @@ int FileStore::dump_journal(ostream& out) int FileStore::mkfs() { int ret = 0; - char buf[PATH_MAX]; int basedir_fd; + char fsid_fn[PATH_MAX]; #if defined(__linux__) struct btrfs_ioctl_vol_args volargs; @@ -871,12 +871,11 @@ int FileStore::mkfs() } // fsid - snprintf(buf, sizeof(buf), "%s/fsid", basedir.c_str()); - fsid_fd = ::open(buf, O_CREAT|O_WRONLY|O_TRUNC, 0644); + snprintf(fsid_fn, sizeof(fsid_fn), "%s/fsid", basedir.c_str()); + fsid_fd = ::open(fsid_fn, O_CREAT|O_WRONLY|O_TRUNC, 0644); if (fsid_fd < 0) { ret = -errno; - derr << "mkfs: failed to open " << buf << ": " - << cpp_strerror(ret) << dendl; + derr << "mkfs: failed to open " << fsid_fn << ": " << cpp_strerror(ret) << dendl; goto close_basedir_fd; } if (lock_fsid() < 0) { -- 2.39.5