what if there's no __NR_oldmount nor __NR_mount?

Andreas Jaeger aj@suse.de
Fri Mar 14 07:21:00 GMT 2003


Alexandre Oliva <aoliva@redhat.com> writes:

> This patch fixes linux/umount.S such that it doesn't fail to assemble
> if an old-style umount syscall is not available at all.  Ok?

In what situation would this happen?

If neither of these is available, the function has to be implemented
anyway as a dummy returning ENOSYS together with a stub-warning.

Andreas

>
> Index: ChangeLog
> 2003-03-14  Alexandre Oliva  <aoliva@redhat.com>
>
> 	* sysdeps/unix/sysv/linux/umount.S: Don't assume at least one
> 	of oldumount and umount must exist.
>
> Index: sysdeps/unix/sysv/linux/umount.S
> ===================================================================
> RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/umount.S,v
> retrieving revision 1.3
> diff -u -p -r1.3 umount.S
> --- sysdeps/unix/sysv/linux/umount.S 20 Aug 1998 19:15:40 -0000 1.3
> +++ sysdeps/unix/sysv/linux/umount.S 15 Jan 2003 15:30:21 -0000
> @@ -2,11 +2,16 @@
>     changes.  They simply rename old system calls.  */
>  
>  #include <sysdep.h>
> -#ifdef __NR_oldumount
> +
> +#if defined __NR_oldumount || defined __NR_umount
> +
> +# ifdef __NR_oldumount
>  PSEUDO (__umount, oldumount, 1)
> -#else
> +# else
>  PSEUDO (__umount, umount, 1)
> -#endif
> +# endif
>  	ret
>  PSEUDO_END(__umount)
>  weak_alias (__umount, umount)
> +
> +#endif /* defined __NR_oldumount || defined __NR_umount */

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj



More information about the Libc-alpha mailing list