Last one, that contains the dirty hack that "fixes" symlinks through
shadow directories in my pacthset.
If you have time to help me port/fix these patches that would be great.
If you already have an updated version pf the patchset that would be
even better.
Thanks for your help.
Benjamin
Index: linux-2.6.21-mm2-netns2/fs/sysfs/symlink.c
===================================================================
--- linux-2.6.21-mm2-netns2.orig/fs/sysfs/symlink.c
+++ linux-2.6.21-mm2-netns2/fs/sysfs/symlink.c
@@ -15,6 +15,7 @@ static int object_depth(struct sysfs_dir
{
int depth = 0;
+ /* Hack: we keep shadow directories in depth calculation */
for (; sd->s_parent; sd = sd->s_parent)
depth++;
@@ -25,8 +26,13 @@ static int object_path_length(struct sys
{
int length = 1;
- for (; sd->s_parent; sd = sd->s_parent)
+ for (; sd->s_parent; sd = sd->s_parent) {
+ if (sd->s_type == SYSFS_SHADOW) {
+ /* Hack: Hide shadow directories from path */
+ continue;
+ }
length += strlen(sd->s_name) + 1;
+ }
return length;
}
@@ -37,6 +43,11 @@ static void fill_object_path(struct sysf
for (; sd->s_parent; sd = sd->s_parent) {
int cur = strlen(sd->s_name);
+ if (sd->s_type == SYSFS_SHADOW) {
+ /* Hack: Hide shadow directories from path */
+ continue;
+ }
+
/* back up enough to print this bus id with '/' */
length -= cur;
strncpy(buffer + length, sd->s_name, cur);
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers