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.h
diff --git
a/src/shared/machine-image.h
b/src/shared/machine-image.h
index 10e5d0a533e50320b19ce6ff8cbce865ad6dacc0..75fa5f453371267ac9e1a3fcfec9893f5f3292db 100644
(file)
--- a/
src/shared/machine-image.h
+++ b/
src/shared/machine-image.h
@@
-27,7
+27,7
@@
typedef enum ImageType {
IMAGE_DIRECTORY,
IMAGE_SUBVOLUME,
typedef enum ImageType {
IMAGE_DIRECTORY,
IMAGE_SUBVOLUME,
- IMAGE_
GPT
,
+ IMAGE_
RAW
,
_IMAGE_TYPE_MAX,
_IMAGE_TYPE_INVALID = -1
} ImageType;
_IMAGE_TYPE_MAX,
_IMAGE_TYPE_INVALID = -1
} ImageType;
@@
-41,8
+41,8
@@
typedef struct Image {
usec_t crtime;
usec_t mtime;
usec_t crtime;
usec_t mtime;
- uint64_t
siz
e;
- uint64_t
siz
e_exclusive;
+ uint64_t
usag
e;
+ uint64_t
usag
e_exclusive;
uint64_t limit;
uint64_t limit_exclusive;
} Image;
uint64_t limit;
uint64_t limit_exclusive;
} Image;
@@
-63,3
+63,8
@@
int image_read_only(Image *i, bool b);
const char* image_type_to_string(ImageType t) _const_;
ImageType image_type_from_string(const char *s) _pure_;
const char* image_type_to_string(ImageType t) _const_;
ImageType image_type_from_string(const char *s) _pure_;
+
+bool image_name_is_valid(const char *s) _pure_;
+
+int image_path_lock(const char *path, int operation, LockFile *global, LockFile *local);
+int image_name_lock(const char *name, int operation, LockFile *ret);