[PATCH] libteam: add SubmittingPatches doc
by Flavio Leitner
Signed-off-by: Flavio Leitner <fbl(a)redhat.com>
---
SubmittingPatches | 46 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
create mode 100644 SubmittingPatches
diff --git a/SubmittingPatches b/SubmittingPatches
new file mode 100644
index 0000000..e8e6ec4
--- /dev/null
+++ b/SubmittingPatches
@@ -0,0 +1,46 @@
+# How to Submit Patches for libteam #
+=======================================
+
+Send changes to libteam as patches to libteam(a)lists.fedorahosted.org
+with copy to jiri(a)resnulli.us.
+
+Avoid using attachments because usually it doesn't work.
+In another words, inline the patch inside the e-mail's body.
+
+The simplest workflow to send changes is using git. The following
+steps will guide you to do the task.
+
+1) Clone the source code on your local machine.
+$ git clone https://github.com/jpirko/libteam.git
+
+2) Create a local branch for you
+$ cd libteam
+$ git checkout -b testbranch
+
+3) Do your changes
+<<do some changes>>
+
+4) Commit them to the repository
+$ git commit -a -s
+
+5) Optionally, you can verify how it looks like in the repo
+$ git show
+
+6) Extract the patch in a standard format into /tmp directory
+$ git format-patch origin -o /tmp --subject-prefix "patch libteam"
+
+7) Use git send-email to send the patch*.
+$ git send-email /tmp/0001-somepatch.patch \
+ --to=libteam(a)lists.fedorahosted.org --cc=jiri(a)resnulli.us
+
+And you are done :)
+
+* You may need to configure smtp in order to send emails, so please
+ check the "Example" section in the reference [3] below as a start.
+
+Additional references about git:
+[1] http://git-scm.com/docs/gittutorial
+[2] http://git-scm.com/docs/gitworkflows.html
+[3] http://git-scm.com/docs/git-send-email
+[4] http://git-scm.com/book
+
--
1.8.5.3
9 years, 11 months
[patch libteam] libteam: Use u8 for put/get TEAM_ATTR_OPTION_TYPE
by Jonas Johansson
Use the same type in libteam and kernel for TEAM_ATTR_OPTION_TYPE.
The kernel uses a 8 bit integer (u8).
Signed-off-by: Jonas Johansson <jonasj76(a)gmail.com>
---
libteam/options.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libteam/options.c b/libteam/options.c
index 69034bf..16f3e98 100644
--- a/libteam/options.c
+++ b/libteam/options.c
@@ -258,7 +258,7 @@ int get_options_handler(struct nl_msg *msg, void *arg)
!option_attrs[TEAM_ATTR_OPTION_TYPE]) {
return NL_SKIP;
}
- nla_type = nla_get_u32(option_attrs[TEAM_ATTR_OPTION_TYPE]);
+ nla_type = nla_get_u8(option_attrs[TEAM_ATTR_OPTION_TYPE]);
data_attr = option_attrs[TEAM_ATTR_OPTION_DATA];
if (nla_type != NLA_FLAG && !data_attr)
return NL_SKIP;
@@ -743,7 +743,7 @@ static int set_option_value(struct team_handle *th, struct team_option *option,
if (option->id.array_index_used)
NLA_PUT_U32(msg, TEAM_ATTR_OPTION_ARRAY_INDEX,
option->id.array_index);
- NLA_PUT_U32(msg, TEAM_ATTR_OPTION_TYPE, nla_type);
+ NLA_PUT_U8(msg, TEAM_ATTR_OPTION_TYPE, nla_type);
switch (nla_type) {
case NLA_U32:
NLA_PUT_U32(msg, TEAM_ATTR_OPTION_DATA, *((__u32 *) data));
--
1.8.3.2
9 years, 11 months
[PATCH] Use u8 for put/get TEAM_ATTR_OPTION_TYPE
by Jonas Johansson
Use the same type in libteam and kernel for TEAM_ATTR_OPTION_TYPE.
The kernel uses a 8 bit integer (u8).
Signed-off-by: Jonas Johansson <jonasj76(a)gmail.com>
---
libteam/options.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libteam/options.c b/libteam/options.c
index 69034bf..16f3e98 100644
--- a/libteam/options.c
+++ b/libteam/options.c
@@ -258,7 +258,7 @@ int get_options_handler(struct nl_msg *msg, void *arg)
!option_attrs[TEAM_ATTR_OPTION_TYPE]) {
return NL_SKIP;
}
- nla_type = nla_get_u32(option_attrs[TEAM_ATTR_OPTION_TYPE]);
+ nla_type = nla_get_u8(option_attrs[TEAM_ATTR_OPTION_TYPE]);
data_attr = option_attrs[TEAM_ATTR_OPTION_DATA];
if (nla_type != NLA_FLAG && !data_attr)
return NL_SKIP;
@@ -743,7 +743,7 @@ static int set_option_value(struct team_handle *th,
struct team_option *option,
if (option->id.array_index_used)
NLA_PUT_U32(msg, TEAM_ATTR_OPTION_ARRAY_INDEX,
option->id.array_index);
- NLA_PUT_U32(msg, TEAM_ATTR_OPTION_TYPE, nla_type);
+ NLA_PUT_U8(msg, TEAM_ATTR_OPTION_TYPE, nla_type);
switch (nla_type) {
case NLA_U32:
NLA_PUT_U32(msg, TEAM_ATTR_OPTION_DATA, *((__u32 *) data));
--
1.9.1
9 years, 11 months