History log of /openbmc/obmc-console/ (Results 76 – 100 of 200)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
7eb20ac602-May-2023 Andrew Jeffery <andrew@aj.id.au>

obmc-console: Introduce a changelog

Follow the changelog structure outlined at https://keepachangelog.com/

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I663231bf9adb9298cc122b2c399bfc

obmc-console: Introduce a changelog

Follow the changelog structure outlined at https://keepachangelog.com/

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I663231bf9adb9298cc122b2c399bfc7c19c7513e

show more ...

095db47602-May-2023 Andrew Jeffery <andrew@aj.id.au>

README: Convert the build instructions to meson

This probably should have been done before the removal of the autotools
build system, but who reads READMEs anyway.

Signed-off-by: Andrew Jeffery <an

README: Convert the build instructions to meson

This probably should have been done before the removal of the autotools
build system, but who reads READMEs anyway.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I4483f6608fd54ac0db6d78a116185056b96adbfc

show more ...

4dfefa9702-May-2023 Andrew Jeffery <andrew@aj.id.au>

test: ringbuffer-test-utils: Add stdlib.h for malloc()/free()

Include what we use to address clang-tidy issues:

```
Error while processing /mnt/host/andrew/home/andrew/src/openbmc/obmc-console/test

test: ringbuffer-test-utils: Add stdlib.h for malloc()/free()

Include what we use to address clang-tidy issues:

```
Error while processing /mnt/host/andrew/home/andrew/src/openbmc/obmc-console/test/ringbuffer-test-utils.c.
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/test/ringbuffer-test-utils.c:25:2: error: call to undeclared library function 'free' with type 'void (void *)'; ISO C99 and later do not support implicit function declarations [clang-diagnostic-implicit-function-declaration]
free(ctx->data);
^
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/test/ringbuffer-test-utils.c:25:2: note: include the header <stdlib.h> or explicitly provide a declaration for 'free'
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/test/ringbuffer-test-utils.c:64:15: error: call to undeclared library function 'realloc' with type 'void *(void *, unsigned long)'; ISO C99 and later do not support implicit function declarations [clang-diagnostic-implicit-function-declaration]
ctx->data = realloc(ctx->data, ctx->len + len);
^
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/test/ringbuffer-test-utils.c:64:15: note: include the header <stdlib.h> or explicitly provide a declaration for 'realloc'
```

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Icf6d9ab735fb035572e8953ec474afd81efa53e9

show more ...

c9f4a55627-Apr-2023 Ninad Palsule <ninadpalsule@us.ibm.com>

Adding myself as a reviewer

Requesting to add me as a reviewer.

Change-Id: Id5b56cf4d2595fc909c6ba8be0c2cd7d777702ba
Signed-off-by: Ninad Palsule <ninadpalsule@us.ibm.com>

b14ca19c31-Mar-2023 Ninad Palsule <ninadpalsule@us.ibm.com>

Added new dbus interface to query console info

obmc-console recipe configure consoles by setting the socket-id
field in the console server config file. obmc-console server use this
socket id to buil

Added new dbus interface to query console info

obmc-console recipe configure consoles by setting the socket-id
field in the console server config file. obmc-console server use this
socket id to build a abract socket name and register new service
"xyz.openbmc_project.Console.Access". The leaf of the object path will
be socket-id configured. It also exposes the unix abstract socket name
through SocketName property. The socket name is sent as a byte stream as
abstract socket contains null character at the start.

*** For example if recipe configured socket-id as "console0" the
*** following object is exported through dbus interface

# Tree for "console0" console.
$ busctl tree xyz.openbmc_project.Console.console0
`-/xyz
`-/xyz/openbmc_project
`-/xyz/openbmc_project/console
`-/xyz/openbmc_project/console/console0

# Get SocketName property for console0 object
$ busctl get-property xyz.openbmc_project.Console.console0 /xyz/openbmc_project/console/console0 xyz.openbmc_project.Console.Access SocketName
ay 22 0 111 98 109 99 45 99 111 110 115 111 108 101 46 99 111 110 115 111 108 101 48

# Tree for "hypervisor" console
$ busctl tree xyz.openbmc_project.Console.hypervisor
`-/xyz
`-/xyz/openbmc_project
`-/xyz/openbmc_project/console
`-/xyz/openbmc_project/console/hypervisor

# Get SocketName property for hypervisor object
$ busctl get-property xyz.openbmc_project.Console.hypervisor /xyz/openbmc_project/console/hypervisor xyz.openbmc_project.Console.Access SocketName
ay 24 0 111 98 109 99 45 99 111 110 115 111 108 101 46 104 121 112 101 114 118 105 115 111 114

# Note that this is an example of two consoles one is 'console0' and
# second is 'hypervisor'. I have formated the output to easy viewing.
# We also have one extra service for console that is coming from the
# service exist today to get/set the tty device baud rate.
$ busctl call xyz.openbmc_project.ObjectMapper \
/xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper \
GetSubTree sias /xyz/openbmc_project/console 0 1 \
xyz.openbmc_project.Console.Access
a{sa{sas}}
2
"/xyz/openbmc_project/console/console0" \
1
"xyz.openbmc_project.Console.console0"
4 "org.freedesktop.DBus.Introspectable"
"org.freedesktop.DBus.Peer"
"org.freedesktop.DBus.Properties"
"xyz.openbmc_project.Console.Access"
"/xyz/openbmc_project/console/hypervisor"
2
"xyz.openbmc_project.Console.hypervisor"
4 "org.freedesktop.DBus.Introspectable"
"org.freedesktop.DBus.Peer"
"org.freedesktop.DBus.Properties"
"xyz.openbmc_project.Console.Access"
"xyz.openbmc_project.console"
4 "org.freedesktop.DBus.Introspectable"
"org.freedesktop.DBus.Peer"
"org.freedesktop.DBus.Properties"
"xyz.openbmc_project.Console.Access"

Tested:
Tested on the rainer system with busctl command and integration
with bmcweb

Related commits:
1) phosphor-dbus-interface: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/61486
2) obmc-console: https://gerrit.openbmc.org/c/openbmc/obmc-console/+/62496
3) bmcweb: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/62525

Change-Id: Ifb70ce5585c3937f3abd904ffbae51ca67f58724
Signed-off-by: Ninad Palsule <ninadpalsule@us.ibm.com>

show more ...

e258e51f26-Apr-2023 Ninad Palsule <ninadpalsule@us.ibm.com>

Split dbus related code into separate file

Moved dbus related code into separate file. This can be used to disable
dbus interface if required.

Change-Id: I880639983edaf00c64acc4acb786203c51b414e7
S

Split dbus related code into separate file

Moved dbus related code into separate file. This can be used to disable
dbus interface if required.

Change-Id: I880639983edaf00c64acc4acb786203c51b414e7
Signed-off-by: Ninad Palsule <ninadpalsule@us.ibm.com>

show more ...

4e71869126-Apr-2023 Ninad Palsule <ninadpalsule@us.ibm.com>

Fixed broken dbus interface for multiple consoles

There is a console server instance per console. So if there are two
consoles then two console server instances will be started. The issue
is that ea

Fixed broken dbus interface for multiple consoles

There is a console server instance per console. So if there are two
consoles then two console server instances will be started. The issue
is that each instance is sharing same bus name and object path. The
issue is fixed by keeping the interface name same as before
(xyz.openbmc_project.console) but changing the bus name and object path
name by appending socket-id which makes them unique. So the bus name
becomes xyz.openbmc_project.Console.<socket-id> and the object name
becomes /xyz/openbmc_project/Console/<socket-id>. Each console server
has its own socket-id hence there should not be any conflict between two
consoles.

Testing:
-> Ran busctl to check object changes
$ busctl get-property xyz.openbmc_project.Console.console0 /xyz/openbmc_project/console/console0 xyz.openbmc_project.console baudrate
u 0
$ busctl introspect xyz.openbmc_project.Console.console0 /xyz/openbmc_project/console/console0 ....
xyz.openbmc_project.Console interface - - -
.setBaudRate method u x -
.baudrate property u 0 -

Change-Id: Ic1aacd8f284a867416081b4965b55ba7c3cb34e3
Signed-off-by: Ninad Palsule <ninadpalsule@us.ibm.com>

show more ...

b377362125-Apr-2023 Andrew Jeffery <andrew@aj.id.au>

obmc-console: Remove autotools build system

After introducing the meson build system and switching over the bitbake
recipe there's no need to continue maintaining the autotools build.

Signed-off-by

obmc-console: Remove autotools build system

After introducing the meson build system and switching over the bitbake
recipe there's no need to continue maintaining the autotools build.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I49c808284e640e3c1efe1f9e555c31c7a3af041c

show more ...


86e3fd7021-Apr-2023 Andrew Jeffery <andrew@aj.id.au>

meson: Install obmc-console-server in $sbindir for consistency

Currently the autotools build and the systemd service units expect
obmc-console-server to be installed in ${sbindir}. This probably sti

meson: Install obmc-console-server in $sbindir for consistency

Currently the autotools build and the systemd service units expect
obmc-console-server to be installed in ${sbindir}. This probably still
isn't quite right (`${libexecdir}/obmc-console/` might be a better
choice by [1]) but at least it's consistent.

[1] https://github.com/openbmc/docs/blob/master/anti-patterns.md#incorrect-placement-of-executables-in-sbin-usrsbin-or-bin-usrbin

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I6db11d0916ce40d0dcae4617d1ae1ddab3fe9a81

show more ...

dd4fa59120-Apr-2023 Andrew Jeffery <andrew@aj.id.au>

test: test-config-parse-logsize: Fix invalid size_t format specifier

Caught by building under bitbake:

```
| arm-openbmc-linux-gnueabi-gcc -march=armv7-a -mfpu=vfpv4-d16 -mfloat-abi=hard -fstack-pr

test: test-config-parse-logsize: Fix invalid size_t format specifier

Caught by building under bitbake:

```
| arm-openbmc-linux-gnueabi-gcc -march=armv7-a -mfpu=vfpv4-d16 -mfloat-abi=hard -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/var/tmp/bitbake/build/p10bmc/tmp/work/p10bmc-openbmc-linux-gnueabi/obmc-console/1.0+gitAUTOINC+533f9702a3-r1/recipe-sysroot -Itest/test-config-parse-logsize.p -Itest -I../git/test -I. -I../git -flto=auto -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -std=gnu17 -D_GNU_SOURCE -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/var/tmp/bitbake/build/p10bmc/tmp/work/p10bmc-openbmc-linux-gnueabi/obmc-console/1.0+gitAUTOINC+533f9702a3-r1/git=/usr/src/debug/obmc-console/1.0+gitAUTOINC+533f9702a3-r1 -fdebug-prefix-map=/var/tmp/bitbake/build/p10bmc/tmp/work/p10bmc-openbmc-linux-gnueabi/obmc-console/1.0+gitAUTOINC+533f9702a3-r1/git=/usr/src/debug/obmc-console/1.0+gitAUTOINC+533f9702a3-r1 -fmacro-prefix-map=/var/tmp/bitbake/build/p10bmc/tmp/work/p10bmc-openbmc-linux-gnueabi/obmc-console/1.0+gitAUTOINC+533f9702a3-r1/build=/usr/src/debug/obmc-console/1.0+gitAUTOINC+533f9702a3-r1 -fdebug-prefix-map=/var/tmp/bitbake/build/p10bmc/tmp/work/p10bmc-openbmc-linux-gnueabi/obmc-console/1.0+gitAUTOINC+533f9702a3-r1/build=/usr/src/debug/obmc-console/1.0+gitAUTOINC+533f9702a3-r1 -fdebug-prefix-map=/var/tmp/bitbake/build/p10bmc/tmp/work/p10bmc-openbmc-linux-gnueabi/obmc-console/1.0+gitAUTOINC+533f9702a3-r1/recipe-sysroot= -fmacro-prefix-map=/var/tmp/bitbake/build/p10bmc/tmp/work/p10bmc-openbmc-linux-gnueabi/obmc-console/1.0+gitAUTOINC+533f9702a3-r1/recipe-sysroot= -fdebug-prefix-map=/var/tmp/bitbake/build/p10bmc/tmp/work/p10bmc-openbmc-linux-gnueabi/obmc-console/1.0+gitAUTOINC+533f9702a3-r1/recipe-sysroot-native= -fpic -O2 '-DSYSCONFDIR=""' -MD -MQ test/test-config-parse-logsize.p/test-config-parse-logsize.c.o -MF test/test-config-parse-logsize.p/test-config-parse-logsize.c.o.d -o test/test-config-parse-logsize.p/test-config-parse-logsize.c.o -c ../git/test/test-config-parse-logsize.c
| ../git/test/test-config-parse-logsize.c: In function 'test_config_parse_logsize':
| ../git/test/test-config-parse-logsize.c:56:60: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
| 56 | warn("[%zu] Str %s expected size %lu, got size %lu\n",
| | ~~^
| | |
| | long unsigned int
| | %u
| 57 | i, test_data[i].test_str,
| 58 | test_data[i].expected_size, size);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | size_t {aka unsigned int}
| ../git/test/test-config-parse-logsize.c:56:74: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
| 56 | warn("[%zu] Str %s expected size %lu, got size %lu\n",
| | ~~^
| | |
| | long unsigned int
| | %u
| 57 | i, test_data[i].test_str,
| 58 | test_data[i].expected_size, size);
| | ~~~~
| | |
| | size_t {aka unsigned int}
| cc1: all warnings being treated as errors
```

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I70a8077f2ab990a3b5aaab85aad545411ebd0a04

show more ...

533f970209-Mar-2023 Ninad Palsule <ninadpalsule@us.ibm.com>

Changes for new pre-defined usergroup hostconsole

The new pre-defined usergroup named "hostconsole" is added to
differentiate access between host console and manager console.
The only users allowed

Changes for new pre-defined usergroup hostconsole

The new pre-defined usergroup named "hostconsole" is added to
differentiate access between host console and manager console.
The only users allowed to interact with host console are part of the
"hostconsole" group.

Note: The changes are spread across multiple repositories listed under
"Related commits:"

The obmc-console changes to incorporate new group are as follows:
- Remove dependency on dropbear.default file by adding new default file
dropbear.env for obmc-console. This file is required for obmc
services. This file is added in obmc-console-ssh@.service.in and
use-socket.conf
- In future we can add file /etc/obmc-console/dropbear.%i.env for port
specific configuration.

Tested:
Loaded on system and qemu eumulator. Made sure that the new file
contents are reflected on the system.

Related commits:
docs: https://gerrit.openbmc.org/c/openbmc/docs/+/60968
phosphor-user-manager: https://gerrit.openbmc.org/c/openbmc/phosphor-user-manager/+/61583
openbmc: https://gerrit.openbmc.org/c/openbmc/openbmc/+/61582
obmc-console: https://gerrit.openbmc.org/c/openbmc/obmc-console/+/61581
bmcweb: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/61580

Change-Id: Id080d0cf1c8dea7c383bc040c988dae2b4a09800
Signed-off-by: Ninad Palsule <ninadpalsule@us.ibm.com>

show more ...

59d29a9f18-Apr-2023 Andrew Jeffery <andrew@aj.id.au>

obmc-console: Add clang-tidy configuration

The introduced configuration disables several checks that aren't helpful
in the obmc-console codebase.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Cha

obmc-console: Add clang-tidy configuration

The introduced configuration disables several checks that aren't helpful
in the obmc-console codebase.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I1994da0e3bd8bcfde8ddeafa47d257ed81b08257

show more ...

1b86844118-Apr-2023 Andrew Jeffery <andrew@aj.id.au>

obmc-console: Fix ringbuffer-test-utils analysis

ninja's clang-tidy target barfs due to the strategy of including C files
into each other for test purposes. Help it out by moving the ringbuffer
stru

obmc-console: Fix ringbuffer-test-utils analysis

ninja's clang-tidy target barfs due to the strategy of including C files
into each other for test purposes. Help it out by moving the ringbuffer
struct definitions into console-server.h so it can find them when
analysing test/ringbuffer-test-utils.c.

obmc-console isn't a library, so it's not like we're trying to avoid
expanding API/ABI surface.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ifd4501d3ca7f3bb02c557a1c31364aadd2b26abe

show more ...

b70f871318-Apr-2023 Andrew Jeffery <andrew@aj.id.au>

obmc-console: Fix readability-isolate-declaration

For example:

```
/usr/bin/clang-tidy -checks=-*, readability-isolate-declaration -export-fixes /tmp/tmpoo7fbs72/tmpo8xiwfxs.yaml -p=build /mnt/host

obmc-console: Fix readability-isolate-declaration

For example:

```
/usr/bin/clang-tidy -checks=-*, readability-isolate-declaration -export-fixes /tmp/tmpoo7fbs72/tmpo8xiwfxs.yaml -p=build /mnt/host/andrew/home/andrew/src/openbmc/obmc-console/test/test-client-escape.c
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../config.c:61:2: error: multiple declarations in a single statement reduces readability [readability-isolate-declaration,-warnings-as-errors]
char *name, *value;
^~~~~~~~~~~~~~~~~~~
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../config.c:62:2: error: multiple declarations in a single statement reduces readability [readability-isolate-declaration,-warnings-as-errors]
char *p, *line;
^~~~~~~~~~~~~~~
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../config.c:110:2: error: multiple declarations in a single statement reduces readability [readability-isolate-declaration,-warnings-as-errors]
size_t size, len;
^~~~~~~~~~~~~~~~~
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../config.c:170:2: error: multiple declarations in a single statement reduces readability [readability-isolate-declaration,-warnings-as-errors]
struct config_item *item, *next;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../console-client.c:263:2: error: multiple declarations in a single statement reduces readability [readability-isolate-declaration,-warnings-as-errors]
struct console_client _client, *client;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 warnings generated.
```

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ia7829b1672ea2dfb3fa020c7c48bd8266e6a1769

show more ...

6422215d18-Apr-2023 Andrew Jeffery <andrew@aj.id.au>

obmc-console: Fix readability-inconsistent-declaration-parameter-name

```
/usr/bin/clang-tidy -checks=-*, readability-inconsistent-declaration-parameter-name -export-fixes /tmp/tmppaj3mheq/tmphdn64r

obmc-console: Fix readability-inconsistent-declaration-parameter-name

```
/usr/bin/clang-tidy -checks=-*, readability-inconsistent-declaration-parameter-name -export-fixes /tmp/tmppaj3mheq/tmphdn64rrm.yaml -p=build /mnt/host/andrew/home/andrew/src/openbmc/obmc-console/console-server.c
../console-server.h:82:16: error: function 'console_poller_register' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name,-warnings-as-errors]
struct poller *console_poller_register(struct console *console,
^
../console-server.c:538:16: note: the definition seen here
struct poller *console_poller_register(struct console *console,
^
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../console-server.h:82:16: note: differing parameters are named here: ('event_fn'), in definition: ('poller_fn')
struct poller *console_poller_register(struct console *console,
^
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../console-server.h:93:6: error: function 'console_poller_set_timeout' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name,-warnings-as-errors]
void console_poller_set_timeout(struct console *console, struct poller *poller,
^
../console-server.c:644:6: note: the definition seen here
void console_poller_set_timeout(struct console *console __attribute__((unused)),
^
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../console-server.h:93:6: note: differing parameters are named here: ('interval'), in definition: ('tv')
void console_poller_set_timeout(struct console *console, struct poller *poller,
^
5 warnings generated.
```

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ic9910bc7e716477b8e0eb0e40f32567972cc4529

show more ...

0b7b047718-Apr-2023 Andrew Jeffery <andrew@aj.id.au>

obmc-console: Fix readability-else-after-return

```
/usr/bin/clang-tidy -checks=-*, readability-else-after-return -export-fixes /tmp/tmpzmyw6on0/tmpdk8wt96i.yaml -p=build /mnt/host/andrew/home/andre

obmc-console: Fix readability-else-after-return

```
/usr/bin/clang-tidy -checks=-*, readability-else-after-return -export-fixes /tmp/tmpzmyw6on0/tmpdk8wt96i.yaml -p=build /mnt/host/andrew/home/andrew/src/openbmc/obmc-console/test/test-ringbuffer-boundary-poll.c
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../ringbuffer.c:131:4: error: do not use 'else' after 'return' [readability-else-after-return,-warnings-as-errors]
} else {
^~~~~~
```

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ic80538a64f061f9ed3d3d71293dcf4f3d99cb6e4

show more ...

2834c5b118-Apr-2023 Andrew Jeffery <andrew@aj.id.au>

obmc-console: Fix readability-braces-around-statements

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I88d2bdcb15106298d83a1cf7176e069092820f1d

4ee419df18-Apr-2023 Andrew Jeffery <andrew@aj.id.au>

obmc-console: Fix cert-dcl03-c,misc-static-assert

```
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../test/test-ringbuffer-boundary-read.c:17:2: error: found assert() that could be re

obmc-console: Fix cert-dcl03-c,misc-static-assert

```
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../test/test-ringbuffer-boundary-read.c:17:2: error: found assert() that could be replaced by static_assert() [cert-dcl03-c,misc-static-assert,-warnings-as-errors]
assert(sizeof(in_buf) * 2 > 10);
^~~~~~
static_assert , ""
```

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I53954938355723fb559c28285c88807b44a44d22

show more ...

91b5217518-Apr-2023 Andrew Jeffery <andrew@aj.id.au>

obmc-console: Address bugprone-sizeof-expression

Disable the lint where we know the implementation is valid, but do not
disable it globally.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-I

obmc-console: Address bugprone-sizeof-expression

Disable the lint where we know the implementation is valid, but do not
disable it globally.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ie1640d82138fe91a401188cf966250103a25dde6

show more ...

750fb0c018-Apr-2023 Andrew Jeffery <andrew@aj.id.au>

obmc-console: Fix bugprone-reserved-identifier

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I57ef4792b96cc55112aef4f75667e429d3188bf7

19c74d5818-Apr-2023 Andrew Jeffery <andrew@aj.id.au>

obmc-console: Extract definition of _GNU_SOURCE

Avoid triggering bugprone-reserved-identifier

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I8b4d40c92c1e9633bdb078c3f8d6d97ffb248cc2

5c359cc618-Apr-2023 Andrew Jeffery <andrew@aj.id.au>

obmc-console: Fix bugprone-narrowing-conversions

For example:

```
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../console-server.c:769:9: error: narrowing conversion from 'ssize_t' (

obmc-console: Fix bugprone-narrowing-conversions

For example:

```
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../console-server.c:769:9: error: narrowing conversion from 'ssize_t' (aka 'long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,-warnings-as-errors]
rc = read(console->tty_fd, buf, sizeof(buf));
^
```

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I67c158b411f1533ca3b5a62803116e95907e8c5b

show more ...

fd883a8818-Apr-2023 Andrew Jeffery <andrew@aj.id.au>

console-server: Validate values and fix narrowing conversions

Reported by clang-tidy:

```
/usr/bin/clang-tidy -checks=-*, bugprone-narrowing-conversions -export-fixes /tmp/tmpnat1i6r_/tmpxkxj0mkr.y

console-server: Validate values and fix narrowing conversions

Reported by clang-tidy:

```
/usr/bin/clang-tidy -checks=-*, bugprone-narrowing-conversions -export-fixes /tmp/tmpnat1i6r_/tmpxkxj0mkr.yaml -p=build /mnt/host/andrew/home/andrew/src/openbmc/obmc-console/console-server.c
../console-server.c:290:27: error: narrowing conversion from 'unsigned long' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,-warnings-as-errors]
console->tty_lpc_addr = strtoul(val, &endp, 0);
^
../console-server.c:299:23: error: narrowing conversion from 'unsigned long' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,-warnings-as-errors]
console->tty_sirq = strtoul(val, &endp, 0);
^
```

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Icddb4039b95cf865bc144ec4fa85770a50b97fb3

show more ...

f2232d5f18-Apr-2023 Andrew Jeffery <andrew@aj.id.au>

obmc-console: Fix bugprone-macro-parentheses

For example:

```
/usr/bin/clang-tidy -checks=-*, bugprone-macro-parentheses -export-fixes /tmp/tmpzth2fheg/tmp9x7dpgyc.yaml -p=build /mnt/host/andrew/ho

obmc-console: Fix bugprone-macro-parentheses

For example:

```
/usr/bin/clang-tidy -checks=-*, bugprone-macro-parentheses -export-fixes /tmp/tmpzth2fheg/tmp9x7dpgyc.yaml -p=build /mnt/host/andrew/home/andrew/src/openbmc/obmc-console/console-server.c
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../console-server.h:150:43: error: macro argument should be enclosed in parentheses [bugprone-macro-parentheses,-warnings-as-errors]
^
()
```

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I10b93e2b3e16b51bcdf2adf113a38e67bce37e88

show more ...

5db8c79218-Apr-2023 Andrew Jeffery <andrew@aj.id.au>

obmc-console: Fix bugprone-implicit-widening-of-multiplication-result

For example:

```
/usr/bin/clang-tidy -checks=-*, bugprone-implicit-widening-of-multiplication-result -export-fixes /tmp/tmpppty

obmc-console: Fix bugprone-implicit-widening-of-multiplication-result

For example:

```
/usr/bin/clang-tidy -checks=-*, bugprone-implicit-widening-of-multiplication-result -export-fixes /tmp/tmpppty3tdm/tmpod_qxcie.yaml -p=build /mnt/host/andrew/home/andrew/src/openbmc/obmc-console/test/test-config-parse-logsize.c
../test/test-config-parse-logsize.c:24:11: error: performing an implicit widening conversion to type 'size_t' (aka 'unsigned long') of a multiplication performed in type 'int' [bugprone-implicit-widening-of-multiplication-result,-warnings-as-errors]
{ "4k", 4 * 1024, 0 },
^
```

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I571983c6381fad7a14fb179108d14220f5dfdeca

show more ...

12345678