On Tue, 15 Feb 2005, Steinar H. Gunderson wrote:

- 051_maps_without_trailing_newline.diff is not in, it seems; did you forget
 it or just find a cleaner way?

I think you'll find that this handles the issue (if I understand it correctly).


Index: modules/lookup_file.c
===================================================================
RCS file: /home/cvs/root/autofs/modules/lookup_file.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- modules/lookup_file.c       26 Jan 2005 05:31:38 -0000      1.13
+++ modules/lookup_file.c       6 Feb 2005 10:05:55 -0000       1.14
@@ -1,4 +1,4 @@
-#ident "$Id: lookup_file.c,v 1.13 2005/01/26 05:31:38 raven Exp $"
+#ident "$Id: lookup_file.c,v 1.14 2005/02/06 10:05:55 raven Exp $"
 /* ----------------------------------------------------------------------- *
  *
  *  lookup_file.c - module for Linux automount to query a flat file map
@@ -202,6 +202,11 @@
                        } else if (mapent_len < MAPENT_MAX_LEN) {
                                mapent_len++;
                                *(p++) = ch;
+                               nch = getc(f);
+                               if (nch == EOF &&
+                                  (gotten == got_real || gotten == getting))
+                                       goto got_it;
+                               ungetc(nch, f);
                        }
                        break;
                }

_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs

Reply via email to