Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gm_s86dl.h: Use __kernel_daddr_t for solaris_x86_slice.s_start #15

Merged
merged 1 commit into from Aug 6, 2022

Conversation

pevik
Copy link
Contributor

@pevik pevik commented Jul 8, 2019

musl libc does not define daddr_t as it's deprecated, therefore
use __kernel_daddr_t from <linux/types.h>.

Signed-off-by: Petr Vorel petr.vorel@gmail.com

musl libc does not define daddr_t as it's deprecated, therefore
use __kernel_daddr_t from <linux/types.h>.

Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
@pevik
Copy link
Contributor Author

pevik commented Jul 8, 2019

NOTE: I've sent similar patch to kpartx:
https://www.redhat.com/archives/dm-devel/2019-July/msg00072.html

@pevik
Copy link
Contributor Author

pevik commented Jul 9, 2019

@baruch
Copy link
Owner

baruch commented Jul 9, 2019

Actually the big question is what is the size in bytes for these on-disk structures and not really the specific type I like to use. It would be nice if the code actually worked across architectures (even if only x86-32 and x86-64).

The code as it came down wasn't very good about it but it would be nice to get the changes done in a more sensible way.

@baruch baruch self-assigned this Jul 9, 2019
@pevik
Copy link
Contributor Author

pevik commented Oct 2, 2019

Sorry for the delay, agree. I also agree with Christoph Hellwig [1], but I haven't find a correspond solaris source (searching at [2]). It'd be the best to find it and adjust sources according to it. Any change you having a look in solaris sources?

In a meanwhile, my patch for kpartx maintainer merged my changes to use __kernel_daddr_t, which is IMHO wrong. I wonder whether using Linux kernel definition would be correct:

struct solaris_x86_slice {
        __le16 s_tag;           /* ID tag of partition */
        __le16 s_flag;          /* permission flags */
        __le32 s_start;         /* start sector no of partition */
        __le32 s_size;          /* # of blocks in partition */
};

See also my reply [3].

[1] https://www.redhat.com/archives/dm-devel/2019-July/msg00087.html
[2] https://grok.elemental.org/source/
[3] https://www.redhat.com/archives/dm-devel/2019-October/msg00016.html

@baruch baruch merged commit b507b6d into baruch:master Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants