diff options
Diffstat (limited to 'libbb/loop.c')
-rw-r--r-- | libbb/loop.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libbb/loop.c b/libbb/loop.c index ada0c7638..85b2724e5 100644 --- a/libbb/loop.c +++ b/libbb/loop.c | |||
@@ -102,7 +102,8 @@ int FAST_FUNC get_free_loop(void) | |||
102 | * search will re-use an existing loop device already bound to that | 102 | * search will re-use an existing loop device already bound to that |
103 | * file/offset if it finds one. | 103 | * file/offset if it finds one. |
104 | */ | 104 | */ |
105 | int FAST_FUNC set_loop(char **device, const char *file, unsigned long long offset, unsigned flags) | 105 | int FAST_FUNC set_loop(char **device, const char *file, unsigned long long offset, |
106 | unsigned long long sizelimit, unsigned flags) | ||
106 | { | 107 | { |
107 | char dev[LOOP_NAMESIZE]; | 108 | char dev[LOOP_NAMESIZE]; |
108 | char *try; | 109 | char *try; |
@@ -185,6 +186,7 @@ int FAST_FUNC set_loop(char **device, const char *file, unsigned long long offse | |||
185 | memset(&loopinfo, 0, sizeof(loopinfo)); | 186 | memset(&loopinfo, 0, sizeof(loopinfo)); |
186 | safe_strncpy((char *)loopinfo.lo_file_name, file, LO_NAME_SIZE); | 187 | safe_strncpy((char *)loopinfo.lo_file_name, file, LO_NAME_SIZE); |
187 | loopinfo.lo_offset = offset; | 188 | loopinfo.lo_offset = offset; |
189 | loopinfo.lo_sizelimit = sizelimit; | ||
188 | /* | 190 | /* |
189 | * Used by mount to set LO_FLAGS_AUTOCLEAR. | 191 | * Used by mount to set LO_FLAGS_AUTOCLEAR. |
190 | * LO_FLAGS_READ_ONLY is not set because RO is controlled by open type of the file. | 192 | * LO_FLAGS_READ_ONLY is not set because RO is controlled by open type of the file. |