add: if (fFile < 0) {  bidirectional = false; fFile = open(device, O_WRONLY | O_EXCL | O_BINARY, 0); }  if (fFile < 0) return;  if (! msg)  return;  msg->AddBool("bidirectional", bidirectional); msg->AddString("_serial/DeviceName", device);
context: SerialPort::SerialPort(BDirectory* printer, BMessage* msg) 	: fFile(-1){	char address[80];	char device[B_PATH_NAME_LENGTH];	int size = printer->ReadAttr("transport_address", B_STRING_TYPE, 0, address, sizeof(address));	if (size <= 0 || size >= sizeof(address)) return;	address[size] = 0; // make sure string is 0-terminated			strcat(strcpy(device, "/dev/ports/"), address);	fFile = open(device, O_RDWR | O_EXCL | O_BINARY, 0);}