Skip to content

Commit

Permalink
- fixed compilation with older gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
aschnell committed Feb 14, 2024
1 parent 9219cc5 commit b66e814
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions snapper/BcachefsUtils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ namespace snapper
create_subvolume(int fddst, const string& name)
{
struct bch_ioctl_subvolume args = {
.flags = 0,
.dirfd = (__u32) fddst,
.mode = 0777,
.dst_ptr = (__u64) name.c_str(),
.src_ptr = 0,
flags : 0,
dirfd : (__u32) fddst,
mode : 0777,
dst_ptr : (__u64) name.c_str(),
src_ptr : 0,
};

if (ioctl(fddst, BCH_IOCTL_SUBVOLUME_CREATE, &args) < 0)
Expand All @@ -98,11 +98,11 @@ namespace snapper
flags |= BCH_SUBVOL_SNAPSHOT_RO; // TODO does not work

struct bch_ioctl_subvolume args = {
.flags = flags,
.dirfd = (__u32) fddst,
.mode = 0777,
.dst_ptr = (__u64) name.c_str(),
.src_ptr = (__u64) subvolume.c_str(), // TODO use fd instead of subvolume
flags : flags,
dirfd : (__u32) fddst,
mode : 0777,
dst_ptr : (__u64) name.c_str(),
src_ptr : (__u64) subvolume.c_str(), // TODO use fd instead of subvolume
};

if (ioctl(fddst, BCH_IOCTL_SUBVOLUME_CREATE, &args) < 0)
Expand All @@ -114,11 +114,11 @@ namespace snapper
delete_subvolume(int fd, const string& name)
{
struct bch_ioctl_subvolume args = {
.flags = 0,
.dirfd = (__u32) fd,
.mode = 0777,
.dst_ptr = (__u64) name.c_str(),
.src_ptr = 0,
flags : 0,
dirfd : (__u32) fd,
mode : 0777,
dst_ptr : (__u64) name.c_str(),
src_ptr : 0,
};

if (ioctl(fd, BCH_IOCTL_SUBVOLUME_DESTROY, &args) < 0)
Expand Down

0 comments on commit b66e814

Please sign in to comment.