Add a somewhat ugly hack that makes OSX serial device node names

human-readable.

MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
trasz 2018-05-21 17:33:52 +00:00
parent 9e9fdad73c
commit cb557132e6
3 changed files with 21 additions and 3 deletions

View File

@ -81,7 +81,13 @@ enum {
#define MODEM_DEFAULT_INTERFACE "Virtual serial port"
#define MODEM_DEFAULT_MANUFACTURER USB_TEMPLATE_MANUFACTURER
#define MODEM_DEFAULT_PRODUCT "Virtual serial port"
#define MODEM_DEFAULT_SERIAL_NUMBER "March 2008"
/*
* The reason for this being called like this is that OSX
* derives the device node name from it, resulting in a somewhat
* user-friendly "/dev/cu.usbmodemFreeBSD1". And yes, the "1"
* needs to be there, otherwise OSX will mangle it.
*/
#define MODEM_DEFAULT_SERIAL_NUMBER "FreeBSD1"
static struct usb_string_descriptor modem_interface;
static struct usb_string_descriptor modem_manufacturer;

View File

@ -99,7 +99,13 @@ enum {
#define MULTI_DEFAULT_CONFIGURATION "Default configuration"
#define MULTI_DEFAULT_MANUFACTURER USB_TEMPLATE_MANUFACTURER
#define MULTI_DEFAULT_PRODUCT "Multifunction Device"
#define MULTI_DEFAULT_SERIAL_NUMBER "May 2018"
/*
* The reason for this being called like this is that OSX
* derives the device node name from it, resulting in a somewhat
* user-friendly "/dev/cu.usbmodemFreeBSD1". And yes, the "1"
* needs to be there, otherwise OSX will mangle it.
*/
#define MULTI_DEFAULT_SERIAL_NUMBER "FreeBSD1"
static struct usb_string_descriptor multi_modem;
static struct usb_string_descriptor multi_eth_mac;

View File

@ -97,7 +97,13 @@ enum {
#define SERIALNET_DEFAULT_CONFIGURATION "Default configuration"
#define SERIALNET_DEFAULT_MANUFACTURER USB_TEMPLATE_MANUFACTURER
#define SERIALNET_DEFAULT_PRODUCT "Serial/Ethernet device"
#define SERIALNET_DEFAULT_SERIAL_NUMBER "January 2015"
/*
* The reason for this being called like this is that OSX
* derives the device node name from it, resulting in a somewhat
* user-friendly "/dev/cu.usbmodemFreeBSD1". And yes, the "1"
* needs to be there, otherwise OSX will mangle it.
*/
#define SERIALNET_DEFAULT_SERIAL_NUMBER "FreeBSD1"
static struct usb_string_descriptor serialnet_modem;
static struct usb_string_descriptor serialnet_eth_mac;