[systemd-devel] 60-persistent-storage.rules: add NVMe disks and partitions (again)

Mantas Mikulėnas grawity at gmail.com
Sat May 16 01:42:20 PDT 2015


On May 16, 2015 11:18, "Per Bergqvist" <per at bst.lu> wrote:
>
> Lennart,
>
> Thank you for all the comments.
>
> I have changed everything except the 'No space between function name and
opening “(“‘.
> Cannot find anything about that in CODING_STYLE or evidence in other
sources.

"Most every call in the entire source tree uses that style" should be good
enough as evidence.

If you don't care about being consistent with existing code, at least be
consistent with *your own* code, where you also use 'func()' most of the
time.

> +        log_parse_environment();
> +        log_open();
> +
> +        udev = udev_new();
> +        if (udev == NULL)
> +                return EXIT_SUCCESS;
> +
> +        while (1) {
> +                int option;
> +
> +                option = getopt_long(argc, argv, "xh", options, NULL);

Here,

> +        fd = open(node, O_RDONLY|O_NONBLOCK|O_CLOEXEC);
> +        if (fd < 0) {
> +                log_error_errno(errno, "Unable to open '%s': %m", node);
> +                return -errno;
> +        }
> +
> +        if (nvme_identify(udev, fd, &nvme_id_ctrl, sizeof(struct
nvme_id_ctrl)) == 0) {

here,

> +                memcpy (model, nvme_id_ctrl.mn, sizeof(nvme_id_ctrl.mn));

but for some reason not here.

This could be easily fixed up at commit time, though.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150516/211c907c/attachment.html>


More information about the systemd-devel mailing list