Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/fs/udf Translate 254/255 compID values used for deleted ...



details:   https://anonhg.NetBSD.org/src/rev/17893fc8dff3
branches:  trunk
changeset: 361119:17893fc8dff3
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Fri Feb 11 16:33:18 2022 +0000

description:
Translate 254/255 compID values used for deleted entries as per UDF spec. This
allows the printing of the names of deleted file entries.

diffstat:

 sys/fs/udf/udf_osta.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r c9cdc5975fce -r 17893fc8dff3 sys/fs/udf/udf_osta.c
--- a/sys/fs/udf/udf_osta.c     Fri Feb 11 14:10:12 2022 +0000
+++ b/sys/fs/udf/udf_osta.c     Fri Feb 11 16:33:18 2022 +0000
@@ -1,10 +1,10 @@
-/* $NetBSD: udf_osta.c,v 1.10 2013/08/05 17:02:54 joerg Exp $ */
+/* $NetBSD: udf_osta.c,v 1.11 2022/02/11 16:33:18 reinoud Exp $ */
 #if HAVE_NBTOOL_CONFIG_H
 #include "nbtool_config.h"
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: udf_osta.c,v 1.10 2013/08/05 17:02:54 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_osta.c,v 1.11 2022/02/11 16:33:18 reinoud Exp $");
 
 /*
  * Various routines from the OSTA 2.01 specs.  Copyrights are included with
@@ -54,6 +54,12 @@
        /* Use UDFCompressed to store current byte being read. */
        compID = UDFCompressed[0];
 
+       /* Translate 254/255 compID values used for deleted entries */
+       if (compID == 254)
+               compID = 8;
+       if (compID == 255)
+               compID = 16;
+
        /* First check for valid compID. */
        if (compID != 8 && compID != 16) {
                returnValue = -1;



Home | Main Index | Thread Index | Old Index