Skip to content

Commit

Permalink
Try and stop binslice crashing.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgiven committed Dec 12, 2023
1 parent 78f7e51 commit 80c6523
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
make -C ack PREFIX=$HOME +ack-cpm
make -C ack PREFIX=$HOME install
- name: make
run: PATH=$PATH:$HOME/bin make verbose all
run: PATH=$PATH:$HOME/bin make

- name: date
run: |
Expand Down
4 changes: 2 additions & 2 deletions build/cpm.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ def binslice(name, src, start, length=None):
name = name,
srcs = [ src ],
outs = [ name + ".img" ],
cmd = "tail -c+%d $< > $@" % (start)
cmd = "dd status=none if=$< of=$@ bs=1 skip=%d" % (start)
)
else:
native.genrule(
name = name,
srcs = [ src ],
outs = [ name + ".img" ],
cmd = "tail -c+%d $< | head -c%d > $@" % (start, length)
cmd = "dd status=none if=$< of=$@ bs=1 skip=%d count=%d" % (start, length)
)

def diskimage(name, format, bootfile, map):
Expand Down

0 comments on commit 80c6523

Please sign in to comment.