Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Mar 2007 12:36:54 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/usr.sbin/snapinfo snapinfo.c
Message-ID:  <200703161236.l2GCasoJ070707@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
pjd         2007-03-16 12:36:54 UTC

  FreeBSD src repository

  Modified files:
    usr.sbin/snapinfo    snapinfo.c 
  Log:
  Imagine a situation where:
  
          # ls -ld /mnt/{foo,bar}
          drwxr-xr-x  3 root  wheel  512 Mar 16 06:56 /mnt/bar
          lrwxr-xr-x  1 root  wheel    3 Mar 16 12:10 /mnt/foo -> bar
  
          # grep /mnt/foo /etc/fstab
          /dev/da1        /mnt/foo        ufs     rw      0       0
  
  Which means, we give symbolic link as a mount point to mount(8), but mount(8)
  use realpath(3) before mounting the file systems, so we get:
  
          # mount | grep /dev/da1
          /dev/da1 on /mnt/bar (ufs, local)
  
  Before the commit:
  
          # snapinfo /mnt/foo
          usage: snapinfo [-v] -a
                 snapinfo [-v] mountpoint
          # snapinfo /mnt/bar
          /mnt/bar/snap
  
  This commit makes snapinfo(8) to first realpath(3) the given mount point and
  now we have:
  
          # snapinfo /mnt/foo
          /mnt/bar/snap
          # snapinfo /mnt/bar
          /mnt/bar/snap
  
  Revision  Changes    Path
  1.3       +11 -4     src/usr.sbin/snapinfo/snapinfo.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200703161236.l2GCasoJ070707>