chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a snprinf wrapper which checks that the buffer was big enough
[elogind.git]
/
src
/
shared
/
machine-image.c
diff --git
a/src/shared/machine-image.c
b/src/shared/machine-image.c
index 5112d24a8f201802c0bfade362511d099dc9d3d7..8ea61052bd74c5f5a68d1b14d88c06b3390073ac 100644
(file)
--- a/
src/shared/machine-image.c
+++ b/
src/shared/machine-image.c
@@
-73,7
+73,7
@@
static int image_new(
i->read_only = read_only;
i->crtime = crtime;
i->mtime = mtime;
i->read_only = read_only;
i->crtime = crtime;
i->mtime = mtime;
- i->
size = i->siz
e_exclusive = (uint64_t) -1;
+ i->
usage = i->usag
e_exclusive = (uint64_t) -1;
i->limit = i->limit_exclusive = (uint64_t) -1;
i->name = strdup(pretty);
i->limit = i->limit_exclusive = (uint64_t) -1;
i->name = strdup(pretty);
@@
-164,8
+164,8
@@
static int image_make(
r = btrfs_subvol_get_quota_fd(fd, "a);
if (r >= 0) {
r = btrfs_subvol_get_quota_fd(fd, "a);
if (r >= 0) {
- (*ret)->
siz
e = quota.referred;
- (*ret)->
siz
e_exclusive = quota.exclusive;
+ (*ret)->
usag
e = quota.referred;
+ (*ret)->
usag
e_exclusive = quota.exclusive;
(*ret)->limit = quota.referred_max;
(*ret)->limit_exclusive = quota.exclusive_max;
(*ret)->limit = quota.referred_max;
(*ret)->limit_exclusive = quota.exclusive_max;
@@
-218,7
+218,7
@@
static int image_make(
if (r < 0)
return r;
if (r < 0)
return r;
- (*ret)->
size = (*ret)->siz
e_exclusive = st.st_blocks * 512;
+ (*ret)->
usage = (*ret)->usag
e_exclusive = st.st_blocks * 512;
(*ret)->limit = (*ret)->limit_exclusive = st.st_size;
return 1;
(*ret)->limit = (*ret)->limit_exclusive = st.st_size;
return 1;