linux-erofs.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] AOSP: erofs-utils: increase val for WITH_ANDROID option
@ 2021-08-25  3:34 Huang Jianan via Linux-erofs
  2021-08-25  7:25 ` Gao Xiang
  2021-08-25  7:44 ` [PATCH v2] " Huang Jianan via Linux-erofs
  0 siblings, 2 replies; 4+ messages in thread
From: Huang Jianan via Linux-erofs @ 2021-08-25  3:34 UTC (permalink / raw)
  To: linux-erofs; +Cc: yh, kevin.liw, guoweichao, guanyuwei

Signed-off-by: Huang Jianan <huangjianan@oppo.com>
---
 mkfs/main.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/mkfs/main.c b/mkfs/main.c
index 10fe14d..9369b72 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -45,10 +45,10 @@ static struct option long_options[] = {
 #endif
 	{"max-extent-bytes", required_argument, NULL, 9},
 #ifdef WITH_ANDROID
-	{"mount-point", required_argument, NULL, 10},
-	{"product-out", required_argument, NULL, 11},
-	{"fs-config-file", required_argument, NULL, 12},
-	{"block-list-file", required_argument, NULL, 13},
+	{"mount-point", required_argument, NULL, 256},
+	{"product-out", required_argument, NULL, 257},
+	{"fs-config-file", required_argument, NULL, 258},
+	{"block-list-file", required_argument, NULL, 259},
 #endif
 	{0, 0, 0, 0},
 };
@@ -289,20 +289,20 @@ static int mkfs_parse_options_cfg(int argc, char *argv[])
 			}
 			break;
 #ifdef WITH_ANDROID
-		case 10:
+		case 256:
 			cfg.mount_point = optarg;
 			/* all trailing '/' should be deleted */
 			opt = strlen(cfg.mount_point);
 			if (opt && optarg[opt - 1] == '/')
 				optarg[opt - 1] = '\0';
 			break;
-		case 11:
+		case 257:
 			cfg.target_out_path = optarg;
 			break;
-		case 12:
+		case 258:
 			cfg.fs_config_file = optarg;
 			break;
-		case 13:
+		case 259:
 			cfg.block_list_file = optarg;
 			break;
 #endif
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] AOSP: erofs-utils: increase val for WITH_ANDROID option
  2021-08-25  3:34 [PATCH] AOSP: erofs-utils: increase val for WITH_ANDROID option Huang Jianan via Linux-erofs
@ 2021-08-25  7:25 ` Gao Xiang
  2021-08-25  7:34   ` Huang Jianan via Linux-erofs
  2021-08-25  7:44 ` [PATCH v2] " Huang Jianan via Linux-erofs
  1 sibling, 1 reply; 4+ messages in thread
From: Gao Xiang @ 2021-08-25  7:25 UTC (permalink / raw)
  To: Huang Jianan; +Cc: yh, kevin.liw, guoweichao, linux-erofs, guanyuwei

Hi Jianan,

On Wed, Aug 25, 2021 at 11:34:16AM +0800, Huang Jianan via Linux-erofs wrote:

Subject: AOSP: erofs-utils: increase val for AOSP-specific long options

> Signed-off-by: Huang Jianan <huangjianan@oppo.com>
> ---
>  mkfs/main.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/mkfs/main.c b/mkfs/main.c
> index 10fe14d..9369b72 100644
> --- a/mkfs/main.c
> +++ b/mkfs/main.c
> @@ -45,10 +45,10 @@ static struct option long_options[] = {
>  #endif
>  	{"max-extent-bytes", required_argument, NULL, 9},
>  #ifdef WITH_ANDROID
> -	{"mount-point", required_argument, NULL, 10},
> -	{"product-out", required_argument, NULL, 11},
> -	{"fs-config-file", required_argument, NULL, 12},
> -	{"block-list-file", required_argument, NULL, 13},
> +	{"mount-point", required_argument, NULL, 256},
> +	{"product-out", required_argument, NULL, 257},
> +	{"fs-config-file", required_argument, NULL, 258},
> +	{"block-list-file", required_argument, NULL, 259},
>  #endif
>  	{0, 0, 0, 0},
>  };
> @@ -289,20 +289,20 @@ static int mkfs_parse_options_cfg(int argc, char *argv[])
>  			}
>  			break;
>  #ifdef WITH_ANDROID
> -		case 10:
> +		case 256:

How about using larger numbers such as 512 for AOSP-specific options?
I'm afraid in the future we might bump up generic options to >= 256
like this as well.

Otherwise looks good to me.

Thanks,
Gao Xiang

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] AOSP: erofs-utils: increase val for WITH_ANDROID option
  2021-08-25  7:25 ` Gao Xiang
@ 2021-08-25  7:34   ` Huang Jianan via Linux-erofs
  0 siblings, 0 replies; 4+ messages in thread
From: Huang Jianan via Linux-erofs @ 2021-08-25  7:34 UTC (permalink / raw)
  To: Gao Xiang; +Cc: yh, kevin.liw, guoweichao, linux-erofs, guanyuwei

在 2021/8/25 15:25, Gao Xiang 写道:
> Hi Jianan,
>
> On Wed, Aug 25, 2021 at 11:34:16AM +0800, Huang Jianan via Linux-erofs wrote:
>
> Subject: AOSP: erofs-utils: increase val for AOSP-specific long options
>
>> Signed-off-by: Huang Jianan <huangjianan@oppo.com>
>> ---
>>   mkfs/main.c | 16 ++++++++--------
>>   1 file changed, 8 insertions(+), 8 deletions(-)
>>
>> diff --git a/mkfs/main.c b/mkfs/main.c
>> index 10fe14d..9369b72 100644
>> --- a/mkfs/main.c
>> +++ b/mkfs/main.c
>> @@ -45,10 +45,10 @@ static struct option long_options[] = {
>>   #endif
>>   	{"max-extent-bytes", required_argument, NULL, 9},
>>   #ifdef WITH_ANDROID
>> -	{"mount-point", required_argument, NULL, 10},
>> -	{"product-out", required_argument, NULL, 11},
>> -	{"fs-config-file", required_argument, NULL, 12},
>> -	{"block-list-file", required_argument, NULL, 13},
>> +	{"mount-point", required_argument, NULL, 256},
>> +	{"product-out", required_argument, NULL, 257},
>> +	{"fs-config-file", required_argument, NULL, 258},
>> +	{"block-list-file", required_argument, NULL, 259},
>>   #endif
>>   	{0, 0, 0, 0},
>>   };
>> @@ -289,20 +289,20 @@ static int mkfs_parse_options_cfg(int argc, char *argv[])
>>   			}
>>   			break;
>>   #ifdef WITH_ANDROID
>> -		case 10:
>> +		case 256:
> How about using larger numbers such as 512 for AOSP-specific options?
> I'm afraid in the future we might bump up generic options to >= 256
> like this as well.

Sounds good, I wiil update soon.

Thanks,
Jianan

> Otherwise looks good to me.
>
> Thanks,
> Gao Xiang


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] AOSP: erofs-utils: increase val for WITH_ANDROID option
  2021-08-25  3:34 [PATCH] AOSP: erofs-utils: increase val for WITH_ANDROID option Huang Jianan via Linux-erofs
  2021-08-25  7:25 ` Gao Xiang
@ 2021-08-25  7:44 ` Huang Jianan via Linux-erofs
  1 sibling, 0 replies; 4+ messages in thread
From: Huang Jianan via Linux-erofs @ 2021-08-25  7:44 UTC (permalink / raw)
  To: linux-erofs; +Cc: yh, kevin.liw, guoweichao, guanyuwei

Use larger numbers for AOSP-specific options in case of bump up
generic options to >= 256 in the future.

Signed-off-by: Huang Jianan <huangjianan@oppo.com>
---
changes since v1:
 - use 512 for AOSP-specific options in case of bump up generic options
   to >= 256 in the future. (Gao Xiang)

 mkfs/main.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/mkfs/main.c b/mkfs/main.c
index 10fe14d..89f2310 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -45,10 +45,10 @@ static struct option long_options[] = {
 #endif
 	{"max-extent-bytes", required_argument, NULL, 9},
 #ifdef WITH_ANDROID
-	{"mount-point", required_argument, NULL, 10},
-	{"product-out", required_argument, NULL, 11},
-	{"fs-config-file", required_argument, NULL, 12},
-	{"block-list-file", required_argument, NULL, 13},
+	{"mount-point", required_argument, NULL, 512},
+	{"product-out", required_argument, NULL, 513},
+	{"fs-config-file", required_argument, NULL, 514},
+	{"block-list-file", required_argument, NULL, 515},
 #endif
 	{0, 0, 0, 0},
 };
@@ -289,20 +289,20 @@ static int mkfs_parse_options_cfg(int argc, char *argv[])
 			}
 			break;
 #ifdef WITH_ANDROID
-		case 10:
+		case 512:
 			cfg.mount_point = optarg;
 			/* all trailing '/' should be deleted */
 			opt = strlen(cfg.mount_point);
 			if (opt && optarg[opt - 1] == '/')
 				optarg[opt - 1] = '\0';
 			break;
-		case 11:
+		case 513:
 			cfg.target_out_path = optarg;
 			break;
-		case 12:
+		case 514:
 			cfg.fs_config_file = optarg;
 			break;
-		case 13:
+		case 515:
 			cfg.block_list_file = optarg;
 			break;
 #endif
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-25  7:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-25  3:34 [PATCH] AOSP: erofs-utils: increase val for WITH_ANDROID option Huang Jianan via Linux-erofs
2021-08-25  7:25 ` Gao Xiang
2021-08-25  7:34   ` Huang Jianan via Linux-erofs
2021-08-25  7:44 ` [PATCH v2] " Huang Jianan via Linux-erofs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).