[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Look up device file name on device_open

From: Samuel Thibault
Subject: Re: [PATCH] Look up device file name on device_open
Date: Mon, 9 Sep 2013 21:03:05 +0200
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)


rekado, le Mon 09 Sep 2013 20:37:17 +0800, a écrit :
> A fresh `master_device' port is now obtained when accessing the device
> file, not only on translator startup.  This ensures that the device
> can be re-opened after netdde has died.

This is indeed the intended fix, but it forgets a couple of things:

- it should only reopen the master device if master_file is not NULL ;
- it should close the previous master device before opening another
one, otherwise you get a port leak on each ds_device_open call.  It
then actually becomes useless to call file_name_lookup in parse_opt(),
and instead call it from ds_device_open itself, and free the port
there (but only when master_file is not NULL of course). The check for
master_device == MACH_PORT_NULL in main should of course be turned into
master_file == NULL.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]