Page MenuHomeFreeBSD

bhyve/snapshot: rename and bump size of MAX_SNAPSHOT_VMNAME
ClosedPublic

Authored by rew on Feb 23 2021, 1:50 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 11, 8:55 AM
Unknown Object (File)
Thu, Nov 6, 3:49 AM
Unknown Object (File)
Sun, Nov 2, 9:53 AM
Unknown Object (File)
Sun, Nov 2, 3:24 AM
Unknown Object (File)
Fri, Oct 31, 4:05 AM
Unknown Object (File)
Sat, Oct 25, 12:15 AM
Unknown Object (File)
Thu, Oct 16, 1:00 PM
Unknown Object (File)
Oct 10 2025, 11:34 AM

Details

Summary

MAX_SNAPSHOT_VMNAME is a macro used to set the size of a character
buffer that stores a filename or the path to a file. I suggest
renaming this macro to MAX_SNAPSHOT_FILENAME instead.

Since MAX_SNAPSHOT_FILENAME is used to store a filename, NAME_MAX is
probably a better value. I thought about PATH_MAX, as it may be more
appropriate, but I chose the more conservative value of the two, so
NAME_MAX.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 37290
Build 34179: arc lint + arc unit

Event Timeline

rew requested review of this revision.Feb 23 2021, 1:50 AM
jhb added a subscriber: jhb.

I would probably use PATH_MAX. Another option is that once this socket is a datagram socket, this could become a variable length packet with a VLA for the filename instead of a fixed size buffer.

This revision is now accepted and ready to land.Feb 25 2021, 7:25 PM