Fredrik Fornwall
9 years ago
4 changed files with 3 additions and 115 deletions
@ -1,35 +0,0 @@ |
|||
diff -u -r ../upstream.git/cmdline/apt-get.cc ./cmdline/apt-get.cc
|
|||
--- ../upstream.git/cmdline/apt-get.cc 2014-03-14 09:05:18.000000000 +0100
|
|||
+++ ./cmdline/apt-get.cc 2014-04-15 21:01:01.072700439 +0200
|
|||
@@ -79,8 +79,11 @@
|
|||
#include <sys/ioctl.h> |
|||
#include <sys/stat.h> |
|||
#include <sys/statfs.h> |
|||
-#include <sys/statvfs.h>
|
|||
+#ifndef __ANDROID__
|
|||
+# include <sys/statvfs.h>
|
|||
+#endif
|
|||
#include <sys/wait.h> |
|||
+#include <termios.h>
|
|||
#include <unistd.h> |
|||
#include <algorithm> |
|||
#include <fstream> |
|||
@@ -854,14 +857,14 @@
|
|||
unsigned long long DebBytes = Fetcher.TotalNeeded(); |
|||
|
|||
// Check for enough free space |
|||
- struct statvfs Buf;
|
|||
+ struct statfs Buf;
|
|||
string OutputDir = "."; |
|||
- if (statvfs(OutputDir.c_str(),&Buf) != 0) {
|
|||
+ if (statfs(OutputDir.c_str(),&Buf) != 0) {
|
|||
if (errno == EOVERFLOW) |
|||
- return _error->WarningE("statvfs",_("Couldn't determine free space in %s"),
|
|||
+ return _error->WarningE("statfs",_("Couldn't determine free space in %s"),
|
|||
OutputDir.c_str()); |
|||
else |
|||
- return _error->Errno("statvfs",_("Couldn't determine free space in %s"),
|
|||
+ return _error->Errno("statfs",_("Couldn't determine free space in %s"),
|
|||
OutputDir.c_str()); |
|||
} else if (unsigned(Buf.f_bfree) < (FetchBytes - FetchPBytes)/Buf.f_bsize) |
|||
{ |
@ -1,44 +0,0 @@ |
|||
diff -u -r ../apt-0.9.16.1/apt-pkg/contrib/cdromutl.cc ./apt-pkg/contrib/cdromutl.cc
|
|||
--- ../apt-0.9.16.1/apt-pkg/contrib/cdromutl.cc 2014-03-15 17:26:21.000000000 +0100
|
|||
+++ ./apt-pkg/contrib/cdromutl.cc 2014-03-25 00:58:55.948730001 +0100
|
|||
@@ -24,7 +24,6 @@
|
|||
#include <iostream> |
|||
#include <string> |
|||
#include <vector> |
|||
-#include <sys/statvfs.h>
|
|||
#include <dirent.h> |
|||
#include <fcntl.h> |
|||
#include <sys/stat.h> |
|||
@@ -239,6 +238,7 @@
|
|||
closedir(D); |
|||
|
|||
// Some stats from the fsys |
|||
+#ifndef __ANDROID__
|
|||
if (_config->FindB("Debug::identcdrom",false) == false) |
|||
{ |
|||
struct statvfs Buf; |
|||
@@ -258,6 +258,7 @@
|
|||
} |
|||
else |
|||
sprintf(S,"-%u.debug",Version); |
|||
+#endif
|
|||
|
|||
Res = Hash.Result().Value() + S; |
|||
return true; |
|||
@@ -266,6 +267,7 @@
|
|||
// FindMountPointForDevice - Find mountpoint for the given device /*{{{*/ |
|||
string FindMountPointForDevice(const char *devnode) |
|||
{ |
|||
+#ifndef __ANDROID__
|
|||
// this is the order that mount uses as well |
|||
std::vector<std::string> const mounts = _config->FindVector("Dir::state::MountPoints", "/etc/mtab,/proc/mount"); |
|||
|
|||
@@ -290,7 +292,7 @@
|
|||
} |
|||
fclose(f); |
|||
} |
|||
-
|
|||
+#endif
|
|||
return string(); |
|||
} |
|||
/*}}}*/ |
@ -1,33 +0,0 @@ |
|||
diff -u -r ../upstream.git/apt-private/private-install.cc ./apt-private/private-install.cc
|
|||
--- ../upstream.git/apt-private/private-install.cc 2014-03-14 09:05:18.000000000 +0100
|
|||
+++ ./apt-private/private-install.cc 2014-04-15 20:58:34.416703941 +0200
|
|||
@@ -24,7 +24,9 @@
|
|||
#include <stdlib.h> |
|||
#include <string.h> |
|||
#include <sys/statfs.h> |
|||
-#include <sys/statvfs.h>
|
|||
+#ifndef __ANDROID__
|
|||
+# include <sys/statvfs.h>
|
|||
+#endif
|
|||
#include <algorithm> |
|||
#include <iostream> |
|||
#include <set> |
|||
@@ -179,14 +181,14 @@
|
|||
if (_config->FindB("APT::Get::Print-URIs") == false && |
|||
_config->FindB("APT::Get::Download",true) == true) |
|||
{ |
|||
- struct statvfs Buf;
|
|||
+ struct statfs Buf;
|
|||
std::string OutputDir = _config->FindDir("Dir::Cache::Archives"); |
|||
- if (statvfs(OutputDir.c_str(),&Buf) != 0) {
|
|||
+ if (statfs(OutputDir.c_str(),&Buf) != 0) {
|
|||
if (errno == EOVERFLOW) |
|||
- return _error->WarningE("statvfs",_("Couldn't determine free space in %s"),
|
|||
+ return _error->WarningE("statfs",_("Couldn't determine free space in %s"),
|
|||
OutputDir.c_str()); |
|||
else |
|||
- return _error->Errno("statvfs",_("Couldn't determine free space in %s"),
|
|||
+ return _error->Errno("statfs",_("Couldn't determine free space in %s"),
|
|||
OutputDir.c_str()); |
|||
} else if (unsigned(Buf.f_bfree) < (FetchBytes - FetchPBytes)/Buf.f_bsize) |
|||
{ |
Loading…
Reference in new issue