[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] - libstore: Add prefix @ to device to pass master device
From: |
Samuel Thibault |
Subject: |
Re: [PATCH] - libstore: Add prefix @ to device to pass master device |
Date: |
Tue, 14 Jan 2020 21:58:58 +0100 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Hello,
Samuel Thibault, le dim. 24 nov. 2019 20:36:36 +0100, a ecrit:
> Damien Zammit, le dim. 24 nov. 2019 12:33:59 +1100, a ecrit:
> > So for example, with this patch I can call:
> >
> > settrans /dev/wd0s2 /hurd/storeio -T typed
> > part:2:device:@/dev/rump:/dev/wd0
>
> Any comment on the syntax, anybody?
It seems nobody spoke against it, so I'd say go for it :)
> > {
> > + /* Parse @master:/dev/hello */
> > + master = strdup (name);
> > + copy = strdup (name);
> > + pos = strchr (copy, ':');
> > + *pos = '\0';
>
> Instead of duplicating all the string and truncating it, you can strchr
> inside name, and strndup that.
>
> You also don't need to strdup for "rest", you can just use rest =
> name+something.
Could you fix these?
Samuel
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH] - libstore: Add prefix @ to device to pass master device,
Samuel Thibault <=