mirror of
https://github.com/ostreedev/ostree.git
synced 2025-01-26 14:04:12 +03:00
Merge pull request #2871 from dustymabe/dusty-fallocate-einval
lib/deploy: skip fallocate call when requested size is 0
This commit is contained in:
commit
67929db1dc
@ -2446,6 +2446,14 @@ get_kernel_layout_size (OstreeSysroot *self, OstreeDeployment *deployment, guint
|
||||
static gboolean
|
||||
dfd_fallocate_check (int dfd, __off_t len, gboolean *out_passed, GError **error)
|
||||
{
|
||||
/* If the requested size is 0 then return early. Passing a 0 len to
|
||||
* fallocate results in EINVAL */
|
||||
if (len == 0)
|
||||
{
|
||||
*out_passed = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
g_auto (GLnxTmpfile) tmpf = {
|
||||
0,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user