serve: Make some error conditions non-fatal, test them.
We don't want flexnbd serve to fall over and die if the client sends an invalid request.
This commit is contained in:
@@ -8,6 +8,10 @@ class FileWriter
|
||||
@pattern = ""
|
||||
end
|
||||
|
||||
def size
|
||||
@blocksize * @pattern.split("").size
|
||||
end
|
||||
|
||||
# We write in fixed block sizes, given by "blocksize"
|
||||
# _ means skip a block
|
||||
# 0 means write a block full of zeroes
|
||||
|
Reference in New Issue
Block a user