repo.or.cz
/
nbdkit.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
tests: Skip test if file extents are not support
[nbdkit.git]
/
tests
/
shebang.pl
blob
17c78210324774e9f582fcfe35e080182c68a179
1
#!../nbdkit perl
2
3
use
strict
;
4
5
my
$disk
=
"\0"
x
(
1024
*
1024
);
6
7
sub
open
8
{
9
my
$readonly
=
shift
;
10
my
$h
= {
readonly
=>
$readonly
};
11
return
$h
;
12
}
13
14
sub
close
15
{
16
my
$h
=
shift
;
17
}
18
19
sub
get_size
20
{
21
my
$h
=
shift
;
22
return
length
(
$disk
);
23
}
24
25
sub
pread
26
{
27
my
$h
=
shift
;
28
my
$count
=
shift
;
29
my
$offset
=
shift
;
30
return
substr
(
$disk
,
$offset
,
$count
);
31
}