CVS commit: src/usr.bin/xlint/lint1

2022-03-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Mar  9 00:20:48 UTC 2022

Modified Files:
src/usr.bin/xlint/lint1: cgram.y

Log Message:
lint: fix indentation in C grammar

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.387 -r1.388 src/usr.bin/xlint/lint1/cgram.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.387 src/usr.bin/xlint/lint1/cgram.y:1.388
--- src/usr.bin/xlint/lint1/cgram.y:1.387	Tue Mar  1 00:17:12 2022
+++ src/usr.bin/xlint/lint1/cgram.y	Wed Mar  9 00:20:48 2022
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.387 2022/03/01 00:17:12 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.388 2022/03/09 00:20:48 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: cgram.y,v 1.387 2022/03/01 00:17:12 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.388 2022/03/09 00:20:48 rillig Exp $");
 #endif
 
 #include 
@@ -1833,16 +1833,17 @@ for_exprs:			/* see C99 6.8.5 */
 	  for_start
 	begin_type_declaration_specifiers end_type
 	notype_init_declarators T_SEMI
-	expression_opt T_SEMI expression_opt T_RPAREN {
+	expression_opt T_SEMI
+	expression_opt T_RPAREN {
 		/* variable declaration in for loop */
 		c99ism(325);
 		for1(NULL, $6, $8);
 		clear_warning_flags();
 	}
-	  | for_start
-	  expression_opt T_SEMI
-	  expression_opt T_SEMI
-	  expression_opt T_RPAREN {
+	| for_start
+	expression_opt T_SEMI
+	expression_opt T_SEMI
+	expression_opt T_RPAREN {
 		for1($2, $4, $6);
 		clear_warning_flags();
 	  }



CVS commit: src/usr.bin/xlint/lint1

2022-03-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Mar  9 00:20:48 UTC 2022

Modified Files:
src/usr.bin/xlint/lint1: cgram.y

Log Message:
lint: fix indentation in C grammar

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.387 -r1.388 src/usr.bin/xlint/lint1/cgram.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/xlint/xlint

2022-03-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Mar  8 23:24:20 UTC 2022

Modified Files:
src/usr.bin/xlint/xlint: xlint.c

Log Message:
lint: fix typo in comment

No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/usr.bin/xlint/xlint/xlint.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/xlint/xlint/xlint.c
diff -u src/usr.bin/xlint/xlint/xlint.c:1.88 src/usr.bin/xlint/xlint/xlint.c:1.89
--- src/usr.bin/xlint/xlint/xlint.c:1.88	Tue Dec 28 22:59:56 2021
+++ src/usr.bin/xlint/xlint/xlint.c	Tue Mar  8 23:24:20 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: xlint.c,v 1.88 2021/12/28 22:59:56 rillig Exp $ */
+/* $NetBSD: xlint.c,v 1.89 2022/03/08 23:24:20 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: xlint.c,v 1.88 2021/12/28 22:59:56 rillig Exp $");
+__RCSID("$NetBSD: xlint.c,v 1.89 2022/03/08 23:24:20 rillig Exp $");
 #endif
 
 #include 
@@ -756,7 +756,7 @@ runchild(const char *path, char *const *
 	case 0:
 		/* child */
 
-		/* setup the standard output if necessary */
+		/* set up the standard output if necessary */
 		if (fdout != -1) {
 			(void)dup2(fdout, STDOUT_FILENO);
 			(void)close(fdout);



CVS commit: src/usr.bin/xlint/xlint

2022-03-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Mar  8 23:24:20 UTC 2022

Modified Files:
src/usr.bin/xlint/xlint: xlint.c

Log Message:
lint: fix typo in comment

No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/usr.bin/xlint/xlint/xlint.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/man

2022-03-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Mar  8 23:13:05 UTC 2022

Modified Files:
src/usr.bin/man: man.c

Log Message:
man: remove unused global variable 'instype' (since yesterday)

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/usr.bin/man/man.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/man/man.c
diff -u src/usr.bin/man/man.c:1.71 src/usr.bin/man/man.c:1.72
--- src/usr.bin/man/man.c:1.71	Tue Mar  8 23:09:36 2022
+++ src/usr.bin/man/man.c	Tue Mar  8 23:13:05 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: man.c,v 1.71 2022/03/08 23:09:36 rillig Exp $	*/
+/*	$NetBSD: man.c,v 1.72 2022/03/08 23:13:05 rillig Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993, 1994, 1995
@@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 19
 #if 0
 static char sccsid[] = "@(#)man.c	8.17 (Berkeley) 1/31/95";
 #else
-__RCSID("$NetBSD: man.c,v 1.71 2022/03/08 23:09:36 rillig Exp $");
+__RCSID("$NetBSD: man.c,v 1.72 2022/03/08 23:13:05 rillig Exp $");
 #endif
 #endif /* not lint */
 
@@ -72,7 +72,7 @@ __RCSID("$NetBSD: man.c,v 1.71 2022/03/0
 enum inserttype {
 	INS_TAIL,
 	INS_HEAD
-} instype;
+};
 
 /*
  * manstate: structure collecting the current global state so we can



CVS commit: src/usr.bin/man

2022-03-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Mar  8 23:13:05 UTC 2022

Modified Files:
src/usr.bin/man: man.c

Log Message:
man: remove unused global variable 'instype' (since yesterday)

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/usr.bin/man/man.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/man

2022-03-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Mar  8 23:09:36 UTC 2022

Modified Files:
src/usr.bin/man: man.c manconf.h

Log Message:
man: remove trailing whitespace

No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/usr.bin/man/man.c
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/man/manconf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/man/man.c
diff -u src/usr.bin/man/man.c:1.70 src/usr.bin/man/man.c:1.71
--- src/usr.bin/man/man.c:1.70	Tue Mar  8 23:05:32 2022
+++ src/usr.bin/man/man.c	Tue Mar  8 23:09:36 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: man.c,v 1.70 2022/03/08 23:05:32 rillig Exp $	*/
+/*	$NetBSD: man.c,v 1.71 2022/03/08 23:09:36 rillig Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993, 1994, 1995
@@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 19
 #if 0
 static char sccsid[] = "@(#)man.c	8.17 (Berkeley) 1/31/95";
 #else
-__RCSID("$NetBSD: man.c,v 1.70 2022/03/08 23:05:32 rillig Exp $");
+__RCSID("$NetBSD: man.c,v 1.71 2022/03/08 23:09:36 rillig Exp $");
 #endif
 #endif /* not lint */
 
@@ -75,7 +75,7 @@ enum inserttype {
 } instype;
 
 /*
- * manstate: structure collecting the current global state so we can 
+ * manstate: structure collecting the current global state so we can
  * easily identify it and pass it to helper functions in one arg.
  */
 struct manstate {
@@ -90,13 +90,13 @@ struct manstate {
 	char *sectionname;	/* -s: limit search to a given man section */
 	int where;		/* -w: just show paths of all matching files */
 	int getpath;	/* -p: print the path of directories containing man pages */
-		
+
 	/* important tags from the config file */
 	TAG *defaultpath;	/* _default: default MANPATH */
 	TAG *subdirs;		/* _subdir: default subdir search list */
 	TAG *suffixlist;	/* _suffix: for files that can be cat()'d */
 	TAG *buildlist;		/* _build: for files that must be built */
-	
+
 	/* tags for internal use */
 	TAG *intmp;		/* _intmp: tmp files we must cleanup */
 	TAG *missinglist;	/* _missing: pages we couldn't find */
@@ -246,8 +246,8 @@ main(int argc, char **argv)
 			argc--;
 		}
 
-	} 
-	
+	}
+
 	if (m.manpath == NULL)
 		m.manpath = getenv("MANPATH"); /* note: -M overrides getenv */
 
@@ -261,7 +261,7 @@ main(int argc, char **argv)
 	m.defaultpath = gettag("_default", 1);
 	m.subdirs = gettag("_subdir", 1);
 	m.suffixlist = gettag("_suffix", 1);
-	m.buildlist = gettag("_build", 1); 
+	m.buildlist = gettag("_build", 1);
 	/* internal use */
 	m.mymanpath = gettag("_new_path", 1);
 	m.missinglist = gettag("_missing", 1);
@@ -276,7 +276,7 @@ main(int argc, char **argv)
 	 * as config() will ensure that any additional entries will match
 	 * the first one.)
 	 */
-	abs_section = (m.section != NULL && 
+	abs_section = (m.section != NULL &&
 		!TAILQ_EMPTY(>entrylist) &&
 			*(TAILQ_FIRST(>entrylist)->s) == '/');
 
@@ -297,7 +297,7 @@ main(int argc, char **argv)
 
 	/*
 	 * [2] section can now only be non-null if the user asked for
-	 * a section and that section's elements did not have 
+	 * a section and that section's elements did not have
 	 * absolute paths.  in this case we use the section's
 	 * elements to override _subdir from the config file.
 	 *
@@ -312,10 +312,10 @@ main(int argc, char **argv)
 	 * go with the default.   in either case we need to append
 	 * the subdir and machine spec to each element of the path.
 	 *
-	 * for absolute section paths that come from the config file, 
-	 * we only append the subdir spec if the path ends in 
-	 * a '/' --- elements that do not end in '/' are assumed to 
-	 * not have subdirectories.  this is mainly for backward compat, 
+	 * for absolute section paths that come from the config file,
+	 * we only append the subdir spec if the path ends in
+	 * a '/' --- elements that do not end in '/' are assumed to
+	 * not have subdirectories.  this is mainly for backward compat,
 	 * but it allows non-subdir configs like:
 	 *	sect3   /usr/share/man/{old/,}cat3
 	 *	doc /usr/{pkg,share}/doc/{sendmail/op,sendmail/intro}
@@ -352,9 +352,9 @@ main(int argc, char **argv)
 	}
 
 	/*
-	 * [4] finally, prepend the "-m" m.addpath to mymanpath if it 
+	 * [4] finally, prepend the "-m" m.addpath to mymanpath if it
 	 * was specified.   subdirs and machine are always applied to
-	 * m.addpath. 
+	 * m.addpath.
 	 */
 	if (m.addpath) {
 
@@ -373,7 +373,7 @@ main(int argc, char **argv)
 		printmanpath();
 		exit(cleanup());
 	}
-		
+
 	/*
 	 * now m.mymanpath is complete!
 	 */
@@ -385,8 +385,8 @@ main(int argc, char **argv)
 #endif
 
 	/*
-	 * start searching for matching files and format them if necessary.   
-	 * setup an interrupt handler so that we can ensure that temporary 
+	 * start searching for matching files and format them if necessary.
+	 * setup an interrupt handler so that we can ensure that 

CVS commit: src/usr.bin/man

2022-03-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Mar  8 23:09:36 UTC 2022

Modified Files:
src/usr.bin/man: man.c manconf.h

Log Message:
man: remove trailing whitespace

No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/usr.bin/man/man.c
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/man/manconf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/man

2022-03-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Mar  8 23:05:32 UTC 2022

Modified Files:
src/usr.bin/man: man.c

Log Message:
man: fix type mismatch between enum and int (since yesterday)

No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/usr.bin/man/man.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/man/man.c
diff -u src/usr.bin/man/man.c:1.69 src/usr.bin/man/man.c:1.70
--- src/usr.bin/man/man.c:1.69	Mon Mar  7 22:43:39 2022
+++ src/usr.bin/man/man.c	Tue Mar  8 23:05:32 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: man.c,v 1.69 2022/03/07 22:43:39 gutteridge Exp $	*/
+/*	$NetBSD: man.c,v 1.70 2022/03/08 23:05:32 rillig Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993, 1994, 1995
@@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 19
 #if 0
 static char sccsid[] = "@(#)man.c	8.17 (Berkeley) 1/31/95";
 #else
-__RCSID("$NetBSD: man.c,v 1.69 2022/03/07 22:43:39 gutteridge Exp $");
+__RCSID("$NetBSD: man.c,v 1.70 2022/03/08 23:05:32 rillig Exp $");
 #endif
 #endif /* not lint */
 
@@ -122,7 +122,8 @@ static void	 jump(char **, const char *,
 static int	 manual(char *, struct manstate *, glob_t *);
 static void	 onsig(int) __dead;
 static void	 usage(void) __dead;
-static void	 addpath(struct manstate *, const char *, size_t, const char *, int);
+static void	 addpath(struct manstate *, const char *, size_t, const char *,
+		 enum inserttype);
 static const char *getclass(const char *);
 static void printmanpath(struct manstate *);
 
@@ -1018,14 +1019,14 @@ getclass(const char *machine)
 
 static void
 addpath(struct manstate *m, const char *dir, size_t len, const char *sub,
-	int ishead)
+	enum inserttype ishead)
 {
 	char buf[2 * MAXPATHLEN + 1];
 	(void)snprintf(buf, sizeof(buf), "%s%s%s{/%s,%s%s%s}",
 	 dir, (dir[len - 1] == '/') ? "" : "/", sub, m->machine,
 	 m->machclass ? "/" : "", m->machclass ? m->machclass : "",
 	 m->machclass ? "," : "");
-	if (addentry(m->mymanpath, buf, ishead) < 0)
+	if (addentry(m->mymanpath, buf, (int)ishead) < 0)
 		errx(EXIT_FAILURE, "malloc failed");
 }
 



CVS commit: src/usr.bin/man

2022-03-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Mar  8 23:05:32 UTC 2022

Modified Files:
src/usr.bin/man: man.c

Log Message:
man: fix type mismatch between enum and int (since yesterday)

No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/usr.bin/man/man.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/ic

2022-03-08 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Tue Mar  8 20:45:56 UTC 2022

Modified Files:
src/sys/dev/ic: aic79xx.c

Log Message:
fix few typos in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/dev/ic/aic79xx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/ic

2022-03-08 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Tue Mar  8 20:45:56 UTC 2022

Modified Files:
src/sys/dev/ic: aic79xx.c

Log Message:
fix few typos in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/dev/ic/aic79xx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ic/aic79xx.c
diff -u src/sys/dev/ic/aic79xx.c:1.63 src/sys/dev/ic/aic79xx.c:1.64
--- src/sys/dev/ic/aic79xx.c:1.63	Sun Dec  5 15:22:37 2021
+++ src/sys/dev/ic/aic79xx.c	Tue Mar  8 20:45:56 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: aic79xx.c,v 1.63 2021/12/05 15:22:37 msaitoh Exp $	*/
+/*	$NetBSD: aic79xx.c,v 1.64 2022/03/08 20:45:56 andvar Exp $	*/
 
 /*
  * Core routines and tables shareable across OS platforms.
@@ -49,7 +49,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: aic79xx.c,v 1.63 2021/12/05 15:22:37 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aic79xx.c,v 1.64 2022/03/08 20:45:56 andvar Exp $");
 
 #include 
 #include 
@@ -404,7 +404,7 @@ ahd_flush_qoutfifo(struct ahd_softc *ahd
 	ahd_run_qoutfifo(ahd);
 
 	/*
-	 * Flush the good status FIFO for compelted packetized commands.
+	 * Flush the good status FIFO for completed packetized commands.
 	 */
 	ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
 	saved_scbptr = ahd_get_scbptr(ahd);
@@ -1837,7 +1837,7 @@ ahd_handle_transmission_error(struct ahd
 		 * through any phases that occur after we release
 		 * this last ack until the LQI manager sees a
 		 * packet phase.  This implies we may have to
-		 * ignore a perfectly valid "unexected busfree"
+		 * ignore a perfectly valid "unexpected busfree"
 		 * after our "initiator detected error" message is
 		 * sent.  A busfree is the expected response after
 		 * we tell the target that its L_Q was corrupted.
@@ -6908,7 +6908,7 @@ ahd_resume(struct ahd_softc *ahd)
  * table entry for TCL.  Return the offset into
  * the SCB that contains the entry for TCL.
  * saved_scbid is dereferenced and set to the
- * scbid that should be restored once manipualtion
+ * scbid that should be restored once manipulation
  * of the TCL entry is complete.
  */
 static inline u_int



CVS commit: src/sys/fs/udf

2022-03-08 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Tue Mar  8 18:30:43 UTC 2022

Modified Files:
src/sys/fs/udf: udf_subr.c

Log Message:
For bug-compatibility with Windows, the last VAT sector must be a multiple of
16/32 from the start of the track.  To allow for scratches, write out at least
a 32 pieces.


To generate a diff of this commit:
cvs rdiff -u -r1.166 -r1.167 src/sys/fs/udf/udf_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/udf/udf_subr.c
diff -u src/sys/fs/udf/udf_subr.c:1.166 src/sys/fs/udf/udf_subr.c:1.167
--- src/sys/fs/udf/udf_subr.c:1.166	Sun Feb  6 20:20:19 2022
+++ src/sys/fs/udf/udf_subr.c	Tue Mar  8 18:30:43 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_subr.c,v 1.166 2022/02/06 20:20:19 andvar Exp $ */
+/* $NetBSD: udf_subr.c,v 1.167 2022/03/08 18:30:43 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -29,7 +29,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.166 2022/02/06 20:20:19 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.167 2022/03/08 18:30:43 reinoud Exp $");
 #endif /* not lint */
 
 
@@ -3797,10 +3797,11 @@ udf_close_logvol(struct udf_mount *ump, 
 {
 	struct vnode *devvp = ump->devvp;
 	struct mmc_op mmc_op;
+	uint32_t phys;
 	int logvol_integrity;
 	int error = 0, error1 = 0, error2 = 0;
 	int tracknr;
-	int nvats, n, nok;
+	int nvats, n, relblk, wrtrack_skew, nok;
 
 	/* already/still closed? */
 	logvol_integrity = udf_rw32(ump->logvol_integrity->integrity_type);
@@ -3821,8 +3822,17 @@ udf_close_logvol(struct udf_mount *ump, 
 		DPRINTF(VOLUMES, ("writeout vat_node\n"));
 		udf_writeout_vat(ump);
 
-		/* at least two DVD packets and 3 CD-R packets */
-		nvats = 32;
+		/*
+		 * For bug-compatibility with Windows, the last VAT sector
+		 * must be a multiple of 16/32 from the start of the track.
+		 * To allow for scratches, write out at least a 32 pieces.
+		 */
+		phys = ump->data_track.track_start;
+		wrtrack_skew = phys % 32;
+
+		phys = ump->data_track.next_writable;
+		relblk = phys % 32;
+		nvats = 32 + 32 - (relblk - wrtrack_skew);
 
 #if notyet
 		/*



CVS commit: src/sys/fs/udf

2022-03-08 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Tue Mar  8 18:30:43 UTC 2022

Modified Files:
src/sys/fs/udf: udf_subr.c

Log Message:
For bug-compatibility with Windows, the last VAT sector must be a multiple of
16/32 from the start of the track.  To allow for scratches, write out at least
a 32 pieces.


To generate a diff of this commit:
cvs rdiff -u -r1.166 -r1.167 src/sys/fs/udf/udf_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/udf

2022-03-08 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Tue Mar  8 10:52:43 UTC 2022

Modified Files:
src/sys/fs/udf: udf_strat_sequential.c

Log Message:
On switching from writing to reading explicitly synchronize the caches. It
isn't strictly needed but some devices in the wild will otherwise bluntly
ignore all reading commands resulting in a kernel and device lockup.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/fs/udf/udf_strat_sequential.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/udf

2022-03-08 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Tue Mar  8 10:52:43 UTC 2022

Modified Files:
src/sys/fs/udf: udf_strat_sequential.c

Log Message:
On switching from writing to reading explicitly synchronize the caches. It
isn't strictly needed but some devices in the wild will otherwise bluntly
ignore all reading commands resulting in a kernel and device lockup.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/fs/udf/udf_strat_sequential.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/udf/udf_strat_sequential.c
diff -u src/sys/fs/udf/udf_strat_sequential.c:1.15 src/sys/fs/udf/udf_strat_sequential.c:1.16
--- src/sys/fs/udf/udf_strat_sequential.c:1.15	Tue May 24 09:55:57 2016
+++ src/sys/fs/udf/udf_strat_sequential.c	Tue Mar  8 10:52:43 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_strat_sequential.c,v 1.15 2016/05/24 09:55:57 reinoud Exp $ */
+/* $NetBSD: udf_strat_sequential.c,v 1.16 2022/03/08 10:52:43 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_strat_sequential.c,v 1.15 2016/05/24 09:55:57 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_strat_sequential.c,v 1.16 2022/03/08 10:52:43 reinoud Exp $");
 #endif /* not lint */
 
 
@@ -549,6 +549,8 @@ udf_doshedule(struct udf_mount *ump)
 	if (new_queue != priv->cur_queue) {
 		DPRINTF(SHEDULE, ("switching from %d to %d\n",
 			priv->cur_queue, new_queue));
+		if (new_queue == UDF_SHED_READING)
+			udf_mmc_synchronise_caches(ump);
 	}
 
 	priv->cur_queue = new_queue;