Fix fstabinfo for mounting /dev/shm, Gentoo #245367.

This commit is contained in:
Roy Marples 2008-11-03 18:00:55 +00:00
parent 282ad4bae6
commit 7467440a29

View File

@ -75,7 +75,8 @@
#include "rc-misc.h"
#ifdef HAVE_GETMNTENT
static struct mntent *getmntfile(const char *file)
static struct mntent *
getmntfile(const char *file)
{
struct mntent *ent;
FILE *fp;
@ -154,7 +155,8 @@ static const char * const longopts_help[] = {
#define OUTPUT_BLOCKDEV (1 << 5)
#define OUTPUT_MOUNT (1 << 6)
int fstabinfo(int argc, char **argv)
int
fstabinfo(int argc, char **argv)
{
struct ENT *ent;
int result = EXIT_SUCCESS;
@ -238,7 +240,7 @@ int fstabinfo(int argc, char **argv)
}
if (optind < argc) {
if (files) {
if (TAILQ_FIRST(files)) {
TAILQ_FOREACH_SAFE(file, files, entries, file_np) {
for (i = optind; i < argc; i++)
if (strcmp(argv[i], file->value) == 0)
@ -260,7 +262,7 @@ int fstabinfo(int argc, char **argv)
eerrorx("%s: emtpy fstab", argv[0]);
}
if (!files || !TAILQ_FIRST(files)) {
if (!TAILQ_FIRST(files)) {
rc_stringlist_free(files);
return (EXIT_FAILURE);
}