uvol: replace with re-write in ucode
authorDaniel Golle <daniel@makrotopia.org>
Thu, 31 Mar 2022 16:51:22 +0000 (17:51 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Thu, 31 Mar 2022 17:45:22 +0000 (18:45 +0100)
commit6350c7bc63a1cf32e4ef9de42d2e47983df25932
treeb17497bcb338ad59f07ed7a137abe99c16609194
parent73b304bf0c8fb51d88d71974afc5449b9ef5fb8f
uvol: replace with re-write in ucode

Replace previous Shell draft-quality implementation of uvol with a
rewrite in ucode[1].
While the new code is slightly larger, it performs much better (as
we no longer fork() for parsing strings like in Shell with grep, sed
and friends).

Before:
  time uvol list -j
  [ ... ]
  real 0m 0.82s
  user 0m 0.13s
  sys 0m 0.10s

After:
  time uvol list -j
  [ ... ]
  real 0m 0.47s
  user 0m 0.05s
  sys 0m 0.05s

[1]: https://github.com/jow-/ucode
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
utils/uvol/Makefile
utils/uvol/files/blockdev_common.uc [new file with mode: 0644]
utils/uvol/files/common.sh [deleted file]
utils/uvol/files/lvm.sh [deleted file]
utils/uvol/files/lvm.uc [new file with mode: 0644]
utils/uvol/files/ubi.sh [deleted file]
utils/uvol/files/ubi.uc [new file with mode: 0644]
utils/uvol/files/uci.uc [new file with mode: 0644]
utils/uvol/files/uvol