Displaying 3 results from an estimated 3 matches for "mntbuf".
Did you mean:
inbuf
2008 Sep 05
0
initial mntent.h, mount features, ipconfig fixes
...getmntent.c
new file mode 100644
index 0000000..c84f1ce
--- /dev/null
+++ b/usr/klibc/getmntent.c
@@ -0,0 +1,60 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <mntent.h>
+
+#define BUFLEN 1024
+
+struct mntent *getmntent_r(FILE *fp, struct mntent *mntbuf, char *buf,
+ int buflen)
+{
+ char *line = NULL;
+ const char *sep = " \t\n";
+
+ if (!fp || !mntbuf || !buf)
+ return NULL;
+
+ while ((line = fgets(buf, buflen, fp)) != NULL) {
+ if (buf[0] == '#' || buf[0] == '\n')
+ continue;
+ break;
+ }
+
+ if (!line)
+ retur...
2008 Sep 07
1
[git pull v2] initial mntent.h, mount features, ipconfig fixes
...getmntent.c
new file mode 100644
index 0000000..8af27f3
--- /dev/null
+++ b/usr/klibc/getmntent.c
@@ -0,0 +1,61 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <mntent.h>
+
+#define BUFLEN 1024
+
+struct mntent *getmntent_r(FILE *fp, struct mntent *mntbuf, char *buf,
+ int buflen)
+{
+ char *line = NULL, *saveptr = NULL;
+ const char *sep = " \t\n";
+
+ if (!fp || !mntbuf || !buf)
+ return NULL;
+
+ while ((line = fgets(buf, buflen, fp)) != NULL) {
+ if (buf[0] == '#' || buf[0] == '\n')
+ continue;
+ break;
+ }
+
+ if...
2003 Jul 31
0
dvd+rw-format -force problem
...ails, with 'unable to unmount' error.
A little tracing in the source, shows that the following patch, will work -
but is a not-so-pretty work-around:
--- transport.hxx.orig Fri Jul 11 12:57:00 2003
+++ transport.hxx Thu Jul 31 21:05:07 2003
@@ -483,8 +483,15 @@
struct statfs *mntbuf;
int ret=0,mntsize,i;
- if (f==-1) f=fd;
-
+ if (f==-1)
+ {
+ f=fd;
+ if (f==-1)
+ {
+ f = open(filename, O_RDONLY|O_NONBLOCK);
+ fd = f;
+ }
+ }
if...