From 20237f3aca01c1319473e4a90b86c9bc4bd42def Mon Sep 17 00:00:00 2001 From: Antonio Abbatangelo Date: Sat, 22 Apr 2023 13:23:28 -0400 Subject: [PATCH] Release 0.4.0 --- Cargo.toml | 2 +- README.md | 31 ++++++++++++++++++++++++++++++- xdvdfs-cli/Cargo.toml | 2 +- xdvdfs-cli/README.md | 31 ++++++++++++++++++++++++++++++- xdvdfs-core/src/write/img.rs | 4 ++-- 5 files changed, 64 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2b3ab24..bd2aa27 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ members = [ [workspace.package] license = "MIT" -version = "0.2.0" +version = "0.4.0" edition = "2021" repository = "https://github.com/antangelo/xdvdfs" homepage = "https://github.com/antangelo/xdvdfs" diff --git a/README.md b/README.md index 965a012..19cd40c 100644 --- a/README.md +++ b/README.md @@ -27,14 +27,43 @@ Commands: ls List files in an image tree List all files in an image, recursively md5 Show MD5 checksums for files in an image - unpack Unpack an entire image to a directory info Print information about image metadata + unpack Unpack an entire image to a directory pack Pack an image from a given directory help Print this message or the help of the given subcommand(s) ``` Running a subcommand with the `-h` flag will show help information for that specific subcommand. +#### Packing an Image + +To pack an image from a directory, run: + +```sh +$ xdvdfs pack [optional output path] +``` + +This will create an iso that matches 1-to-1 with the input directory. + +#### Unpacking + +To unpack an image, run: + +```sh +$ xdvdfs unpack [optional output path] +``` + +#### Other Utilities + +`xdvdfs-cli` supports additional utility tools for use with images. + +| Command | Action | +| - | - | +| `xdvsfs ls [path within image]` | Lists files within the specified directory, defaulting to root | +| `xdvdfs tree ` | Prints a listing of every file within the image | +| `xdvdfs md5 [optional path to file within image]` | Prints md5 sums for specified files, or every file, within the image | +| `xdvdfs info [path within image]` | Prints metadata info for the specified directory entry, or root volume | + ## xdvdfs-core `xdvdfs-core` is a library for working with XDVDFS metadata. diff --git a/xdvdfs-cli/Cargo.toml b/xdvdfs-cli/Cargo.toml index 9df20df..5c8f5da 100644 --- a/xdvdfs-cli/Cargo.toml +++ b/xdvdfs-cli/Cargo.toml @@ -13,7 +13,7 @@ homepage.workspace = true exclude = ["**/*.iso", "**/*.xiso"] [dependencies] -xdvdfs = { path = "../xdvdfs-core", version = "0.2.0" } +xdvdfs = { path = "../xdvdfs-core", version = "0.4.0" } clap = { version = "4.2.1", features = ["derive"] } md-5 = { version = "0.10.5", default-features = false } diff --git a/xdvdfs-cli/README.md b/xdvdfs-cli/README.md index 0430cd4..7ed2dee 100644 --- a/xdvdfs-cli/README.md +++ b/xdvdfs-cli/README.md @@ -21,10 +21,39 @@ Commands: ls List files in an image tree List all files in an image, recursively md5 Show MD5 checksums for files in an image - unpack Unpack an entire image to a directory info Print information about image metadata + unpack Unpack an entire image to a directory pack Pack an image from a given directory help Print this message or the help of the given subcommand(s) ``` Running a subcommand with the `-h` flag will show help information for that specific subcommand. + +#### Packing an Image + +To pack an image from a directory, run: + +```sh +$ xdvdfs pack [optional output path] +``` + +This will create an iso that matches 1-to-1 with the input directory. + +#### Unpacking + +To unpack an image, run: + +```sh +$ xdvdfs unpack [optional output path] +``` + +#### Other Utilities + +`xdvdfs-cli` supports additional utility tools for use with images. + +| Command | Action | +| - | - | +| `xdvsfs ls [path within image]` | Lists files within the specified directory, defaulting to root | +| `xdvdfs tree ` | Prints a listing of every file within the image | +| `xdvdfs md5 [optional path to file within image]` | Prints md5 sums for specified files, or every file, within the image | +| `xdvdfs info [path within image]` | Prints metadata info for the specified directory entry, or root volume | diff --git a/xdvdfs-core/src/write/img.rs b/xdvdfs-core/src/write/img.rs index d2e0476..5b3ecf5 100644 --- a/xdvdfs-core/src/write/img.rs +++ b/xdvdfs-core/src/write/img.rs @@ -129,7 +129,7 @@ pub fn create_xdvdfs_image, E>( as usize; let padding_len = 2048 - file_len % 2048; if padding_len < 2048 { - let padding = vec![0; padding_len]; + let padding = vec![0x00; padding_len]; BlockDeviceWrite::write( image, entry.sector * layout::SECTOR_SIZE + file_len, @@ -150,7 +150,7 @@ pub fn create_xdvdfs_image, E>( let len = BlockDeviceWrite::len(image)? as usize; if len % (32 * 2048) > 0 { let padding = (32 * 2048) - len % (32 * 2048); - let padding = vec![0xff; padding]; + let padding = vec![0x00; padding]; BlockDeviceWrite::write(image, len, &padding)?; }