]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - misc/fstab.c
Prefer https to http for gnu.org and fsf.org URLs
[thirdparty/glibc.git] / misc / fstab.c
index 0e2d86bd059c0f95da93c6ee69c4cea52f0bf061..7a6282127b40f30371ac846a8665a7b0cabf0264 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2013 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
+   <https://www.gnu.org/licenses/>.  */
 
 #include <fstab.h>
 #include <mntent.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <bits/libc-lock.h>
+#include <libc-lock.h>
 
 #define BUFFER_SIZE 0x1fc0
 
@@ -61,8 +61,7 @@ getfsent (void)
 
 
 struct fstab *
-getfsspec (name)
-     const char *name;
+getfsspec (const char *name)
 {
   struct fstab_state *state;
   struct mntent *m;
@@ -78,8 +77,7 @@ getfsspec (name)
 
 
 struct fstab *
-getfsfile (name)
-     const char *name;
+getfsfile (const char *name)
 {
   struct fstab_state *state;
   struct mntent *m;
@@ -95,7 +93,7 @@ getfsfile (name)
 
 
 void
-endfsent ()
+endfsent (void)
 {
   struct fstab_state *state;
 
@@ -165,12 +163,12 @@ fstab_convert (struct fstab_state *state)
   f->fs_file = m->mnt_dir;
   f->fs_vfstype = m->mnt_type;
   f->fs_mntops = m->mnt_opts;
-  f->fs_type = (__hasmntopt (m, FSTAB_RW) ? FSTAB_RW :
-               __hasmntopt (m, FSTAB_RQ) ? FSTAB_RQ :
-               __hasmntopt (m, FSTAB_RO) ? FSTAB_RO :
-               __hasmntopt (m, FSTAB_SW) ? FSTAB_SW :
-               __hasmntopt (m, FSTAB_XX) ? FSTAB_XX :
-               "??");
+  f->fs_type = (__hasmntopt (m, FSTAB_RW) ? FSTAB_RW
+               : __hasmntopt (m, FSTAB_RQ) ? FSTAB_RQ
+               : __hasmntopt (m, FSTAB_RO) ? FSTAB_RO
+               : __hasmntopt (m, FSTAB_SW) ? FSTAB_SW
+               : __hasmntopt (m, FSTAB_XX) ? FSTAB_XX
+               "??");
   f->fs_freq = m->mnt_freq;
   f->fs_passno = m->mnt_passno;
   return f;