From b255b14872dfaa274ff52950c7bb264d197b0cc5 Mon Sep 17 00:00:00 2001 From: Jan Sucan Date: Sat, 9 Nov 2024 13:40:27 +0100 Subject: Add man page for the diff image format --- Makefile | 6 ++++- config.mk | 1 + man/diff-dd.5 | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 man/diff-dd.5 diff --git a/Makefile b/Makefile index f799ed7..8014b02 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,10 @@ install: all mkdir -p ${DESTDIR}${PREFIX}/bin cp -f src/diff-dd ${DESTDIR}${PREFIX}/bin chmod 755 ${DESTDIR}${PREFIX}/bin/diff-dd + mkdir -p ${DESTDIR}${MANPREFIX}/man5 + cp -f man/diff-dd.5 ${DESTDIR}${MANPREFIX}/man5/diff-dd.5 + chmod 644 ${DESTDIR}${MANPREFIX}/man5/diff-dd.5 uninstall: - rm -f ${DESTDIR}${PREFIX}/bin/diff-dd + rm -f ${DESTDIR}${PREFIX}/bin/diff-dd \ + ${DESTDIR}${MANPREFIX}/man5/diff-dd.5 diff --git a/config.mk b/config.mk index 95099be..1f5dd33 100644 --- a/config.mk +++ b/config.mk @@ -2,6 +2,7 @@ PROGRAM_NAME = diff-dd PROGRAM_VERSION = 3.0.0-prealpha PREFIX = /usr/local +MANPREFIX = ${PREFIX}/share/man CC=g++ CFLAGS=-Wall -Wextra -Werror -std=c++17 diff --git a/man/diff-dd.5 b/man/diff-dd.5 new file mode 100644 index 0000000..9909e8c --- /dev/null +++ b/man/diff-dd.5 @@ -0,0 +1,78 @@ +.TH DIFF-DD 5 + +.SH NAME +diff-dd \- the file formats + +.SH DESCRIPTION +This manual page describes the current and the previous formats of \%diff-dd\: +differential images. + +.SS Format v1 +.I s +is a sector size in bytes specified by the user on the command line when the +image was being created. +.I s +is greater or equal 1. + +.I i +is an index of data in a differential image starting from 0. + +The offsets are 64-bit little-endian. + +.TS +tab(;) allbox; +l l l +l l l +l l l +l l l +l l l +l s s +l l l. +T{ +.B Offset (bytes) +T};T{ +.B Size (bytes) +T};T{ +.B Description +T} +.\" +0;8;Offset of data 0 in the output file +8;T{ +.I s +T};Data 0 +.\" +T{ +8 + +.I s +T};8;Offset of data 1 in the output file +T{ +16 + +.I s +T};T{ +.I s +T};Data 1 +.\" +\[char46]\[char46]\[char46] +T{ +(8 + +.I s +) * +.I i +T};8;T{ +Offset of data +.I i +in the output file +T} +T{ +(8 + +.I s +) * +.I i ++ 8 +T};T{ +.I s +T};T{ +Data +.I i +T} +.TE -- cgit v1.2.3