DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 532E3AB72818097 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 532E3AB72818097 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=hRub98uh X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6C4D0384AB7B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1743602588; bh=gzWM5BLGu3Yu9/t2RkgGS52sD1iyi17YwwbgBb0A5SQ=; h=Subject:To:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=hRub98uhhkcRh4iT6xda7UFRV0YZnapngU/Uw9TUs2OSrEhr1EMG1MBFpat/KHHwb 7zRHABT62JNY+2pg6zmRkglkxwGgKqC6xto0prP6WTR4rwDFztfnM24xy6osSNWZq7 3fG96pimVRfOD0vRgseZWT55Lq6PolXhbShsKpWo= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 70D7A3858D34 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 70D7A3858D34 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1743602510; cv=none; b=VhxlKeaGUKGWz/yvi0T2KPzbUEKr97zLmk3vuKG7WxQmpliRpYza1YjCfgDNbbFLqNMVaIGYnDPVcyYBk+kQIY4nDwjV3s8QInuzm3kLrAQdH0YnR7BXR81BBZbuRMn67ocphmkX9lIvaboIh3+ImvnI8qeVOjFDo3605XUeoIw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1743602510; c=relaxed/simple; bh=SOGKgzaVCLAEDDuJqCJRae+7SaWWI5NZS/IKqL4LPTQ=; h=From:Subject:To:Message-ID:Date:MIME-Version; b=qR+7tsFaGT0oiyiJVBK9v28dupM7DRCOXfi4rbmL6hoNnhzWIn3BurHagRLFeRzOH8DXWGoNUTcuRnf1zA4uLSee2eLCrsRcVDIhxynrv77EQFFU8GUOwyPwSYG9FSLAFCux/ZoYgJjHnITnESUi+CdYxCsO6e+pkCWJesTeSHc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 70D7A3858D34 Subject: cygutils 1.4.17-2: lssparse -H does not print hole at offset 0 if more data exists To: cygwin AT cygwin DOT com Message-ID: <5e2eb205-c863-7575-628e-74a968b90a7c@t-online.de> Date: Wed, 2 Apr 2025 16:01:43 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 SeaMonkey/2.53.20 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------E25E9A9547F8260DA59C6AB9" X-TOI-EXPURGATEID: 150726::1743602503-29FF945F-EF4DF97F/0/0 CLEAN NORMAL X-TOI-MSGID: fb26368d-cfe8-4c39-b894-ff0cc550c495 X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Christian Franke via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Christian Franke Sender: "Cygwin" This is a multi-part message in MIME format. --------------E25E9A9547F8260DA59C6AB9 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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. -- Regards, Christian --------------E25E9A9547F8260DA59C6AB9 Content-Type: text/plain; charset=UTF-8; name="lsparse.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="lsparse.patch" LS0tIGxzc3BhcnNlLmMub3JpZwkyMDI1LTA0LTAxIDEwOjQ4OjU0LjAwMDAwMDAwMCArMDIw MAorKysgbHNzcGFyc2UuYwkyMDI1LTA0LTAyIDE1OjQ1OjU0LjE3OTc5NDMwMCArMDIwMApA QCAtMTM4LDcgKzEzOCw3IEBACiAgICAgICogJCAvY3lnZHJpdmUvYy9XaW5kb3dzL3N5c3Rl bTMyL2ZzdXRpbCBzcGFyc2UgcXVlcnlyYW5nZSAuLi4gIwogICAgICAqIG91dHB1dAogICAg ICAqLwotICAgIGZvciAoaT0xIDs7KSB7CisgICAgZm9yIChpPTAgOzspIHsKICAgICAgICAg ZGF0YV9zdGFydCA9IGxzZWVrKGZkLCBvZmZzZXQsIFNFRUtfREFUQSk7CiAgICAgICAgIGlm IChkYXRhX3N0YXJ0ID09IC0xKQogICAgICAgICAgICAgYnJlYWs7Cg== --------------E25E9A9547F8260DA59C6AB9 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- 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 --------------E25E9A9547F8260DA59C6AB9--