File: mount-list-qcarg.pl

package info (click to toggle)
libquota-perl 1.7.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 360 kB
  • sloc: ansic: 975; perl: 793; sh: 51; makefile: 9
file content (34 lines) | stat: -rw-r--r-- 811 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/perl
#
# Author: Tom Zoerner
#
# This program (mount-list-qcarg.pl) is in the public domain and can
# be used and redistributed without restrictions.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

use blib;
use Quota;

my($fsname,$path,$fstyp);

if(!Quota::setmntent()) {
   while(($fsname,$path,$fstyp,$opt) = Quota::getmntent())
   {
      push(@Mtab, "#$fsname#$path#$fstyp#$opt#");
   }
}
Quota::endmntent();

print "Quota arg type=". Quota::getqcargtype() ."\n\n";

foreach (@Mtab)
{
   $path = (split(/#/))[2];
   $qcarg = Quota::getqcarg($path);
   $qcarg = "*UNDEF*" unless defined $qcarg;
   $dev = (stat($path))[0];
   print "${_}$qcarg#$dev\n";
}