File: test-64bit.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 (23 lines) | stat: -rw-r--r-- 650 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/perl
use blib;
use Quota;

$new_bs = 0xA00000000;
$new_bh = 0xC00000000;

# Get uid from username
$uid=31979;
# Get device from filesystem path
$dev = Quota::getqcarg("/mnt");
# Get quota for user
($bc, $bs, $bh,$bt,$ic, $is, $ih, $it)=Quota::query($dev, $uid);
print "CUR $uid - $dev - $bc - $bs - $bh - $bt\n";

print "SET $uid - $dev - $new_bs - $new_bh\n";
($bc, $bs, $bh,$bt,$ic, $is, $ih, $it)=Quota::query($dev, $uid);
if (Quota::setqlim($dev, $uid, $new_bs, $new_bh, 10,12, 1) != 0) {
  warn Quota::strerr,"\n";
}

($bc, $bs, $bh,$bt,$ic, $is, $ih, $it)=Quota::query($dev, $uid);
print "NEW $uid - $dev - $bc - $bs - $bh - $bt\n";