/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to init.d-mandos

  • Committer: Teddy Hogeborn
  • Date: 2019-08-01 17:35:45 UTC
  • Revision ID: teddy@recompile.se-20190801173545-swvm0c6e1e00qdwi
password-agent: Fix memory alignment issue

On many architectures (armel, armhf, mips, mips64el, mipsel, hppa,
ia64, sh4, and sparc64) GCC shows a warning when casting a "char *" to
a "struct inotify_event *"; The exact warning message from GCC is
"cast increases required alignment of target type [-Wcast-align]".

* dracut-module/password-agent.c (read_inotify_event): Change
  "ievent_buffer" to an anonymous struct instead of a char array.
  (test_read_inotify_event_IN_CLOSE_WRITE): - '' -
  (test_read_inotify_event_IN_MOVED_TO): - '' -
  (test_read_inotify_event_IN_DELETE): - '' -
  (test_read_inotify_event_IN_CLOSE_WRITE_badname): - '' -
  (test_read_inotify_event_IN_MOVED_TO_badname): - '' -
  (test_read_inotify_event_IN_DELETE_badname): - '' -

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
# Author: Teddy Hogeborn <teddy@recompile.se>
13
13
# Author: Björn Påhlsson <belorn@recompile.se>
14
 
#
15
 
# Please remove the "Author" lines above and replace them
16
 
# with your own name if you copy and modify this script.
17
14
 
18
15
# Do NOT "set -e"
19
16
 
44
41
. /lib/init/vars.sh
45
42
 
46
43
# Define LSB log_* functions.
47
 
# Depend on lsb-base (>= 3.2-14) to ensure that this file is present.
 
44
# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
 
45
# and status_of_proc is working.
48
46
. /lib/lsb/init-functions
49
47
 
50
48
#
122
120
                2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
123
121
        esac
124
122
        ;;
 
123
  status)
 
124
        status_of_proc "$DAEMON" "$NAME" -p "$PIDFILE" && exit 0 || exit $?
 
125
        ;;
125
126
  #reload|force-reload)
126
127
        #
127
128
        # If do_reload() is not implemented then leave this commented out
148
149
                esac
149
150
                ;;
150
151
          *)
151
 
                # Failed to stop
 
152
                # Failed to stop
152
153
                log_end_msg 1
153
154
                ;;
154
155
        esac
155
156
        ;;
156
 
  status)
157
 
        status_of_proc "$DAEMON" "$NAME" -p "$PIDFILE"
158
 
        ;;
159
157
  *)
160
158
        #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
161
 
        echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
 
159
        echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
162
160
        exit 3
163
161
        ;;
164
162
esac