Michael Schröder
3a3fbf43f6
OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=367
17 lines
645 B
Diff
17 lines
645 B
Diff
--- ./lib/transaction.c.orig 2016-04-21 12:21:53.649740302 +0000
|
|
+++ ./lib/transaction.c 2016-04-21 12:28:00.821356311 +0000
|
|
@@ -134,6 +134,13 @@ static rpmDiskSpaceInfo rpmtsCreateDSI(c
|
|
dsi->iavail = !(sfb.f_ffree == 0 && sfb.f_files == 0)
|
|
? sfb.f_ffree : -1;
|
|
|
|
+ /* normalize block size to 4096 bytes if it is too big. */
|
|
+ if (dsi->bsize > 4096) {
|
|
+ uint64_t old_size = dsi->bavail * dsi->bsize;
|
|
+ dsi->bsize = 4096; /* Assume 4k block size */
|
|
+ dsi->bavail = old_size / dsi->bsize;
|
|
+ }
|
|
+
|
|
/* Find mount point belonging to this device number */
|
|
resolved_path = realpath(dirName, mntPoint);
|
|
if (!resolved_path) {
|