/usr/share/avfs/extfs/uc1541 is in avfs 1.0.1-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | #! /bin/sh
#
# UC1541 Virtual filesystem executive v0.1
# This is for accessing disk image files for the Commodore VIC20/C64/C128
# It requires the utility c1541 that comes bundled with Vice, the emulator
# for the VIC20, C64, C128 and other computers made by Commodore.
# Copyright (C) 2008 Jacques Pelletier
# May be distributed under the terms of the GNU Public License
# <jpelletier@ieee.org>
#
# Define your awk
AWK=awk
# Define which archiver you are using with appropriate options
C1541="c1541"
# There are no time stamps in the disk image, so a bogus timestamp is displayed
mc_c1541_fs_list()
{
$C1541 "$1" -list | gawk -v uid=$(id -ru) '
BEGIN { FS = "\"" }
/No LINES!/ { next }
/BLOCKS FREE/ { next }
$1 == 0 { next }
{
printf "-rw-r--r-- 1 %-8d %-8d %8d Jan 01 1980 00:00 %s\n", uid, 0, $1 * 256, $2
}' 2>/dev/null
}
# Command: copyout archivename storedfilename extractto
# -read image 1541name [fsname]
mc_c1541_fs_copyout()
{
$C1541 "$1" -read "$2" 2> /dev/null
mv "$2" "$3"
}
# FIXME mc can't do chown of the file inside the archive
# Command: copyin archivename storedfilename sourcefile
# -write image fsname [1541name]
mc_c1541_fs_copyin()
{
mv "$3" "$2"
$C1541 "$1" -write "$2" 2> /dev/null
}
# Command: rm archivename storedfilename
# -delete image files
mc_c1541_fs_rm()
{
$C1541 "$1" -delete "$2" 2> /dev/null
}
# The main routine
umask 077
cmd="$1"
shift
case "$cmd" in
list) mc_c1541_fs_list "$@" ;;
copyout) mc_c1541_fs_copyout "$@" ;;
# copyin) mc_c1541_fs_copyin "$@" ;;
rm) mc_c1541_fs_rm "$@" ;;
*) exit 1 ;;
esac
exit 0
|