Skip to content

Commit

Permalink
utsname.h: make new_utsname fields use the proper length constant
Browse files Browse the repository at this point in the history
The members of the new_utsname structure are defined with magic numbers
that *should* correspond to the constant __NEW_UTS_LEN+1.  Everywhere
else, code assumes this and uses the constant, so this patch makes the
structure match.

Originally suggested by Serge here:

https://lists.linux-foundation.org/pipermail/containers/2009-March/016258.html

Signed-off-by: Dan Smith <[email protected]>
Acked-by: Serge Hallyn <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
kk7ds authored and torvalds committed Jun 17, 2009
1 parent b08cd96 commit a7d932a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions include/linux/utsname.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ struct old_utsname {
};

struct new_utsname {
char sysname[65];
char nodename[65];
char release[65];
char version[65];
char machine[65];
char domainname[65];
char sysname[__NEW_UTS_LEN + 1];
char nodename[__NEW_UTS_LEN + 1];
char release[__NEW_UTS_LEN + 1];
char version[__NEW_UTS_LEN + 1];
char machine[__NEW_UTS_LEN + 1];
char domainname[__NEW_UTS_LEN + 1];
};

#ifdef __KERNEL__
Expand Down

0 comments on commit a7d932a

Please sign in to comment.