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

Scripts: fix some bugs #170

Merged
merged 1 commit into from
Jan 16, 2025
Merged

Scripts: fix some bugs #170

merged 1 commit into from
Jan 16, 2025

Conversation

wu-jian-hang
Copy link
Contributor

Modified the matching method for version info in the format of x.x.x_yyyy-mm-dd. And optimized the code format.

struct stat file_stat;
char p_stat[LOADERSIZE];
for(i=0,j=0;i<p_num;i++){
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add new empty line between variable decleration and other code

if (ret || !file_stat.st_size) {
printf("failed to get the file %s size !\n",(info+i)->p_name);
for (i=0, j=0; i<p_num; i++)
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'{' should in the same line with for statement

ret=stat((info+i)->p_name,&file_stat);
if (ret || !file_stat.st_size) {
printf("failed to get the file %s size !\n",(info+i)->p_name);
for (i=0, j=0; i<p_num; i++)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add space between '<'

strcpy(info->p_ldr,dtb_ldr);
void get_dtb_info(struct p_info *info, char *dtb_name, uint32_t dtb_off, char* dtb_ldr)
{
strcpy(info->p_name, dtb_name);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use tab, not space for the indent character.

Copy link
Collaborator

@SophgoChaoWei SophgoChaoWei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please review it again obey linux kernel coding style

…of x.x.x_yyyy-mm-dd and optimized coding format of "gen/pack_firmware*".

Signed-off-by: Jianhang Wu <[email protected]>
@SophgoChaoWei SophgoChaoWei merged commit 63119b4 into sophgo:master Jan 16, 2025
4 checks passed
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.

2 participants