Displaying 20 results from an estimated 34 matches for "setmntent".
Did you mean:
getmntent
2008 Sep 05
0
initial mntent.h, mount features, ipconfig fixes
hello hpa,
please review and on ack merge belows patchset.
thanks
maks
git pull git://git.debian.org/~maks/klibc.git maks
for the changes:
maximilian attems (8):
[klibc] Add initial mntent.h with setmntent() and endmntent()
[klibc] add getmntent()
[klibc] mount: add help arg for usage()
[klibc] mount: list all mounted file systems
[klibc] mount: list fs of particular type
[klibc] mount: read /proc/mounts preferably
[klibc] ipconfig: raise field length for rootpath...
2008 Sep 07
1
[git pull v2] initial mntent.h, mount features, ipconfig fixes
...by kzak:
* add strtok_r()
* use it in getmntent_r()
* getment_r() parses mnt_freq and mnt_passno too
isn't that hard.
thanks
maks
git pull git://git.debian.org/~maks/klibc.git maks
for the changes:
maximilian attems (9):
[klibc] add strtok_r()
[klibc] Add initial mntent.h with setmntent() and endmntent()
[klibc] add getmntent()
[klibc] mount: add help arg for usage()
[klibc] mount: list all mounted file systems
[klibc] mount: list fs of particular type
[klibc] mount: read /proc/mounts preferably
[klibc] ipconfig: raise field length for rootpath...
2008 Jul 03
1
extlinux and install script
...ystem, the extlinux reports the following error.
/usr/bin/extlinux -i /mnt/boot
/mnt/boot is device proc
/usr/bin/extlinux: cannot open device proc
But /mnt/boot is mounted on /dev/sda1 and ext3 file system.
I read the source code and found the following code in
install_loader()
if ( (mtab = setmntent("/proc/mounts", "r")) ) {
while ( (mnt = getmntent(mtab)) ) {
if ( (!strcmp(mnt->mnt_type, "ext2") ||
!strcmp(mnt->mnt_type, "ext3")) &&
!stat(mnt->mnt_fsname, &dst) &&
dst.st_rdev == st...
2011 Apr 04
1
dovecot: auth(default): Can't open configuration file /etc/dovecot/dovecot-sql.conf: Permission denied
...vecot-ldap-example.conf
-rw-r--r-- 1 root root 5589 Apr 4 13:25 dovecot-sql.backup
-rw------- 1 root root 5589 Mar 16 13:31 dovecot-sql.conf
-rw-r--r-- 1 root root 5097 Feb 22 19:03 dovecot-sql-example.conf
---cut---
---cut---
*****:~ # dovecot -n
# 1.2.16: /etc/dovecot/dovecot.conf
Error: setmntent(/etc/mtab) failed: Permission denied
# OS: Linux 2.6.37.1-1.2-desktop i686
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imap imaps pop3 pop3s
ssl: no
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/d...
2015 Oct 22
2
[PATCH] Added btrfs support for vfs_min_size.
...t *m;
+ struct stat stat1, stat2;
+ char *path;
+
+ if (stat (device, &stat1) == -1) {
+ reply_with_perror ("stat: %s", device);
+ return NULL;
+ }
+
+ /* NB: Eventually we should aim to parse /proc/self/mountinfo, but
+ * that requires custom parsing code.
+ */
+ fp = setmntent ("/proc/mounts", "r");
+ if (fp == NULL) {
+ fprintf (stderr, "setmntent: %s: %m\n", "/proc/mounts");
+ exit (EXIT_FAILURE);
+ }
+
+ while ((m = getmntent (fp)) != NULL) {
+ if (stat (m->mnt_fsname, &stat2) == 0) {
+ if (stat1.st_r...
2007 Mar 13
3
Connection closed by foreign host.
...Connection closed by foreign host.
In the log-file I found the following lines:
dovecot: Mar 12 22:49:18 Info: Dovecot v1.0.rc15 starting up
dovecot: Mar 12 22:51:12 Info: imap-login: Login: user=<username>, method=PLAIN, rip=192.168.??.20, lip=192.168.??.3
dovecot: Mar 12 22:51:12 Error: setmntent(/etc/mtab) failed: No such file or directory
dovecot: Mar 12 22:51:12 Error: child 616 (imap) killed with signal 11
Because I'm quite a newbie, I don't know what to do. Therefore I ask here for help.
Thank you!
--
"Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ...
Jetzt GMX Pro...
2001 Nov 06
0
[PATCH] nomtab support
...36 +276,33 @@
return -1;
}
- if ((fd = open(MOUNTED"~", O_RDWR|O_CREAT|O_EXCL, 0600)) == -1)
- {
- fprintf(stderr, "Can't get "MOUNTED"~ lock file");
- return 1;
- }
- close(fd);
-
- if ((mtab = setmntent(MOUNTED, "a+")) == NULL)
- {
- fprintf(stderr, "Can't open " MOUNTED);
- return 1;
- }
+ if (!no_mtab) {
+ if ((fd = open(MOUNTED"~", O_RDWR|O_CREAT|O_EXCL, 0600)) == -1){
+ fprintf(stderr, "Can't get "MO...
2006 May 10
1
Floating Point Exception
I have a Fedora Core server running:
Fedora Core release 4 (Stentz)
kernel version: 2.6.15-1.1833_FC4smp
( I have also tried kernel version: 2.6.16-1.2108_FC4smp)
I compiled the ocfs2 and ocfs2-tools using the following steps:
# MODULES:
tar zxvpf ocfs2-1.2.1.tar.gz
cd ocfs2-1.2.1
./configure
make
make install
# TOOLS:
tar zxf ocfs2-tools-1.2.1.tar.gz
cd ocfs2-tools-1.2.1
./configure
2015 Oct 23
0
Re: [PATCH] Added btrfs support for vfs_min_size.
...> +
> + if (stat (device, &stat1) == -1) {
> + reply_with_perror ("stat: %s", device);
> + return NULL;
> + }
> +
> + /* NB: Eventually we should aim to parse /proc/self/mountinfo, but
> + * that requires custom parsing code.
> + */
> + fp = setmntent ("/proc/mounts", "r");
> + if (fp == NULL) {
> + fprintf (stderr, "setmntent: %s: %m\n", "/proc/mounts");
> + exit (EXIT_FAILURE);
> + }
> +
> + while ((m = getmntent (fp)) != NULL) {
> + if (stat (m->mnt_fsname, &sta...
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
...lib.h>
#include <string.h>
#include <unistd.h>
+#include <errno.h>
+#include <error.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <mntent.h>
@@ -49,10 +51,8 @@ is_root_mounted (void)
* that requires custom parsing code.
*/
fp = setmntent ("/proc/mounts", "r");
- if (fp == NULL) {
- fprintf (stderr, "setmntent: %s: %m\n", "/proc/mounts");
- exit (EXIT_FAILURE);
- }
+ if (fp == NULL)
+ error (EXIT_FAILURE, errno, "setmntent: %s", "/proc/mounts");
while ((m =...
2008 Dec 02
2
my_vsnprintf crash on HP-UX
...le post, I stupidly composed this as a reply to an
earlier mail, which causes it to appear in an older thread. Posting
again so it doesn't get lost in the archives:
dovecot 1.1.7 reliably crashes every time I try to open a mailbox using
IMAP. Error in the logs:
dovecot: Dec 02 23:14:15 Error: setmntent(/etc/mtab) failed: No such
file or directory
dovecot: Dec 02 23:14:16 Panic: IMAP(arandomuser at example.com):
my_vsnprintf(): Output string too big
dovecot: Dec 02 23:14:16 Error: child 4815 (imap) killed with signal 6
dovecot: Dec 02 23:14:19 Panic: IMAP(arandomuser at example.com):
my_vsnprintf(...
2000 Jul 31
0
[patch] smbmount fixes for samba-2.0.7, testers wanted!
...O_RDWR|O_CREAT|O_EXCL, 0600)) == -1) {
- fprintf(stderr, "Can't get "MOUNTED"~ lock file");
+ DEBUG(0,("Can't get "MOUNTED"~ lock file"));
return;
}
close(fd);
if ((mtab = setmntent(MOUNTED, "r")) == NULL) {
- fprintf(stderr, "Can't open " MOUNTED ": %s\n",
- strerror(errno));
+ DEBUG(0,("Can't open " MOUNTED ": %s\n",
+ strerror(errno)));
return;...
2015 Sep 10
2
[PATCH v2 1/1] extlinux: fix memory leak
...ifndef __KLIBC__
-static const char *find_device(const char *mtab_file, dev_t dev)
+static char *find_device(const char *mtab_file, dev_t dev)
{
struct mntent *mnt;
struct stat dst;
FILE *mtab;
- const char *devname = NULL;
+ char *devname = NULL;
bool done;
mtab = setmntent(mtab_file, "r");
@@ -1131,7 +1131,7 @@ static const char *find_device(const char *mtab_file, dev_t dev)
* On newer Linux kernels we can use sysfs to get a backwards mapping
* from device names to standard filenames
*/
-static const char *find_device_sysfs(dev_t dev)
+static char *fi...
2015 Sep 09
1
[PATCH v1 1/1] extlinux: fix memory leak
...ifndef __KLIBC__
-static const char *find_device(const char *mtab_file, dev_t dev)
+static char *find_device(const char *mtab_file, dev_t dev)
{
struct mntent *mnt;
struct stat dst;
FILE *mtab;
- const char *devname = NULL;
+ char *devname = NULL;
bool done;
mtab = setmntent(mtab_file, "r");
@@ -1131,7 +1131,7 @@ static const char *find_device(const char *mtab_file, dev_t dev)
* On newer Linux kernels we can use sysfs to get a backwards mapping
* from device names to standard filenames
*/
-static const char *find_device_sysfs(dev_t dev)
+static char *fi...
2009 Nov 14
2
[PATCH] btrfs-progs: Check mount status of multidevice filesystems
...ything
- * is safe to continue. TODO, this should also scan multi-device filesystems
+ * is safe to continue.
*/
int check_mounted(char *file)
{
struct mntent *mnt;
- struct stat st_buf;
- dev_t file_dev = 0;
- dev_t file_rdev = 0;
- ino_t file_ino = 0;
FILE *f;
int ret = 0;
- if ((f = setmntent ("/proc/mounts", "r")) == NULL)
- return -errno;
+ int loop_fd;
+ struct loop_info loopinfo;
- if (stat(file, &st_buf) < 0) {
+ if ((f = setmntent ("/proc/mounts", "r")) == NULL)
return -errno;
- } else {
- if (S_ISBLK(st_buf.st_mode)) {
- fil...
2008 Nov 06
2
Compilation of 1.1.6 fails on HP-UX 11.31
Hi,
$ uname -srv
HP-UX B.11.31 U
$ cc --version
cc: HP C/aC++ B3910B A.06.20 [May 13 2008]
Compilation fails, output of configure and make are given below. The
cause of this is almost certainly that this version of HP-UX does define
the QCMD macro in sys/quota.h (checked in the ifdef line 26
dovecot-1.1.6/src/plugins/quota/quota-fs.h) as well as the dqblk struct,
but the latter with different
2004 Apr 12
1
libsysfs and klibc
libsysfs is using a few things not in klibc. udev is getting around this by
having a private copy of libsysfs with a few modifications to make it work on
klibc. What's the easiest path for getting the master libsysfs copy working on
klibc?
libsysfs needs two calls:
setmntent, getmntent
These are used to locate the mount point of /sys
It also uses errno so I get link errors for '__errno_location'
libsysfs is at http://linux-diag.sourceforge.net/Sysfsutils.html in the
sysfsutils project.
=====
Jon Smirl
jonsmirl@yahoo.com
_______________________________...
2015 Sep 11
0
[PATCH v2 1/1] extlinux: fix memory leak
...onst char *mtab_file, dev_t dev)
> +static char *find_device(const char *mtab_file, dev_t dev)
> {
> struct mntent *mnt;
> struct stat dst;
> FILE *mtab;
> - const char *devname = NULL;
> + char *devname = NULL;
> bool done;
>
> mtab = setmntent(mtab_file, "r");
> @@ -1131,7 +1131,7 @@ static const char *find_device(const char
> *mtab_file, dev_t dev)
> * On newer Linux kernels we can use sysfs to get a backwards mapping
> * from device names to standard filenames
> */
> -static const char *find_device_sys...
2015 Sep 09
0
[PATCH v1 1/1] extlinux: fix memory leak
...ifndef __KLIBC__
-static const char *find_device(const char *mtab_file, dev_t dev)
+static char *find_device(const char *mtab_file, dev_t dev)
{
struct mntent *mnt;
struct stat dst;
FILE *mtab;
- const char *devname = NULL;
+ char *devname = NULL;
bool done;
mtab = setmntent(mtab_file, "r");
@@ -1131,7 +1131,7 @@ static const char *find_device(const char *mtab_file, dev_t dev)
* On newer Linux kernels we can use sysfs to get a backwards mapping
* from device names to standard filenames
*/
-static const char *find_device_sysfs(dev_t dev)
+static char *fi...
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
Wherever we had code which did:
if (something_bad) {
perror (...);
exit (EXIT_FAILURE);
}
replace this with use of the error(3) function:
if (something_bad)
error (EXIT_FAILURE, errno, ...);
The error(3) function is supplied by glibc, or by gnulib on platforms
which don't have it, and is much more flexible than perror(3). Since
we already use error(3), there seems to be