#if defined(__linux__)
int basedir_fd;
struct btrfs_ioctl_vol_args volargs;
+ memset(&volargs, 0, sizeof(volargs));
#endif
if (!m_filestore_dev.empty()) {
// current
#if defined(__linux__)
- memset(&volargs, 0, sizeof(volargs));
basedir_fd = ::open(basedir.c_str(), O_RDONLY);
volargs.fd = 0;
strcpy(volargs.name, "current");
// snap_create and snap_destroy?
struct btrfs_ioctl_vol_args volargs;
+ memset(&volargs, 0, sizefo(volargs));
volargs.fd = fd;
strcpy(volargs.name, "sync_snap_test");
r = ::ioctl(fd, BTRFS_IOC_SNAP_CREATE, &volargs);
if (btrfs_wait_sync) {
// async snap creation?
struct btrfs_ioctl_vol_args vol_args;
+ memset(&vol_args, 0, sizeof(vol_args));
vol_args.fd = 0;
strcpy(vol_args.name, "async_snap_test");
struct btrfs_ioctl_vol_args_v2 async_args;
+ memset(&async_args, 0, sizeof(async_args));
async_args.fd = fd;
async_args.flags = BTRFS_SUBVOL_CREATE_ASYNC;
strcpy(async_args.name, "async_snap_test");
}
btrfs_ioctl_vol_args vol_args;
+ memset(&vol_args, 0, sizeof(vol_args));
vol_args.fd = 0;
strcpy(vol_args.name, "current");
if (btrfs_snap_create_v2) {
// be smart!
struct btrfs_ioctl_vol_args_v2 async_args;
+ memset(&async_args, 0, sizeof(async_args));
async_args.fd = current_fd;
async_args.flags = BTRFS_SUBVOL_CREATE_ASYNC;
snprintf(async_args.name, sizeof(async_args.name), COMMIT_SNAP_ITEM,
} else {
// the synchronous snap create does a sync.
struct btrfs_ioctl_vol_args vol_args;
+ memset(&vol_args, 0, sizeof(vol_args));
vol_args.fd = current_fd;
snprintf(vol_args.name, sizeof(vol_args.name), COMMIT_SNAP_ITEM,
(long long unsigned)cp);
if (btrfs_stable_commits) {
while (snaps.size() > 2) {
btrfs_ioctl_vol_args vol_args;
+ memset(&vol_args, 0, sizefo(vol_args));
vol_args.fd = 0;
snprintf(vol_args.name, sizeof(vol_args.name), COMMIT_SNAP_ITEM,
(long long unsigned)snaps.front());