Skip to content

Commit

Permalink
Allow bigger filenames
Browse files Browse the repository at this point in the history
Not that I know why. 80-character filename limits are kind of cute.

Joerg suggested _POSIX_PATH_MAX, which is almost certainly the right
value.  But that's bigger than HUGE:

   #define HUGE    1000           /* Huge number                  */

which obviously means we shouldn't go quite *that* extreme.

Remember, we come from the days when it was hard to do allocations
larger than 64kB.   We have limits, dammit.

"256 bytes is enough for anybody"

Reported-by: Joerg Scheurich <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
torvalds committed Jul 19, 2018
1 parent 5a28f14 commit 1cdcf9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion estruct.h
Original file line number Diff line number Diff line change
@@ -226,7 +226,7 @@
/* Internal constants. */

#define NBINDS 256 /* max # of bound keys */
#define NFILEN 80 /* # of bytes, file name */
#define NFILEN 256 /* # of bytes, file name */
#define NBUFN 16 /* # of bytes, buffer name */
#define NLINE 256 /* # of bytes, input line */
#define NSTRING 128 /* # of bytes, string buffers */

2 comments on commit 1cdcf9d

@TheScreechingBagel
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

big if true!

@dindinG41TR3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Please sign in to comment.