On Sun, Apr 6, 2025 at 9:53 AM Mark Geisert via Cygwin
<cygwin@cygwin.com> wrote:
>
> Hi Roland,
>
> On 4/5/2025 7:56 AM, Roland Mainz via Cygwin wrote:
> > On Wed, Apr 2, 2025 at 4:01 PM Christian Franke via Cygwin
> > <cygwin@cygwin.com> wrote:
> >>
> >> Testcase for a minor issue:
> >>
> >> $ > sparse_file
> >>
> >> $ chattr +S sparse_file
> >>
> >> $ dd if=/dev/zero bs=1M count=1 conv=sparse,notrunc of=sparse_file
> >> ...
> >> $ lssparse sparse_file # OK
> >>
> >> $ lssparse -H sparse_file # OK
> >> Hole range[0]: offset=0x0,      length=0x100000
> >>
> >> $ printf X >> sparse_file
> >>
> >> $ lssparse sparse_file # OK
> >> Data range[1]: offset=0x100000, length=0x1
> >>
> >> $ lssparse -H sparse_file # Missing 'Hole range[0]'
> >> Data range[1]: offset=0x100000, length=0x1
> >>
> >> The condition at lssparse.c:161 is never true:
> >>
> >>      141      for (i=1 ;;) {
> >>      ...
> >>      161          if (print_holes && (i == 0) && (data_start > 0)) {
> >>
> >> Possible patch attached. Important: Not tested with other corner cases.
> >
> > 1. *Thanks* ... :-)
> >
> > 2. New version is available from
> > http://svn.nrubsig.org/svn/people/gisburn/code/sparsefiles/lssparse.c
>
> This new version has been added to an updated cygutils 1.4.17-3 release
> as announced in
> https://cygwin.com/pipermail/cygwin-announce/2025-April/012256.html
> Thanks & Regards,

FYI I updated 
http://svn.nrubsig.org/svn/people/gisburn/code/sparsefiles/lssparse.c
to pass the Solaris/Illumos "cstyle" rules, e.g. the source now
conforms UNIX C formatting rules (no functional changes, this was just
to follow formatting rules of other UNIX versions).

----

Bye,
Roland
-- 
  __ .  . __
 (o.\ \/ /.o) roland.ma...@nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to